[wpilib, hal] High Level REV PH changes (#3792)

More functionality was implemented at the HAL level, so expose that to the wpilib level.

This also does units changes for all the PH related functionality.
This commit is contained in:
Thad House
2021-12-19 13:41:35 -08:00
committed by GitHub
parent 59a7528fd6
commit 34b2d0dae1
23 changed files with 770 additions and 143 deletions

View File

@@ -48,10 +48,14 @@ bool Compressor::GetPressureSwitchValue() const {
return m_module->GetPressureSwitch();
}
double Compressor::GetCurrent() const {
units::ampere_t Compressor::GetCurrent() const {
return m_module->GetCompressorCurrent();
}
units::volt_t Compressor::GetAnalogVoltage() const {
return m_module->GetAnalogVoltage(0);
}
void Compressor::Disable() {
m_module->DisableCompressor();
}
@@ -60,13 +64,13 @@ void Compressor::EnableDigital() {
m_module->EnableCompressorDigital();
}
void Compressor::EnableAnalog(double minAnalogVoltage,
double maxAnalogVoltage) {
void Compressor::EnableAnalog(units::volt_t minAnalogVoltage,
units::volt_t maxAnalogVoltage) {
m_module->EnableCompressorAnalog(minAnalogVoltage, maxAnalogVoltage);
}
void Compressor::EnableHybrid(double minAnalogVoltage,
double maxAnalogVoltage) {
void Compressor::EnableHybrid(units::volt_t minAnalogVoltage,
units::volt_t maxAnalogVoltage) {
m_module->EnableCompressorHybrid(minAnalogVoltage, maxAnalogVoltage);
}