[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

@@ -95,7 +95,14 @@ class Compressor : public wpi::Sendable,
*
* @return The current through the compressor, in amps
*/
double GetCurrent() const;
units::ampere_t GetCurrent() const;
/**
* Query the analog input voltage (on channel 0) (if supported).
*
* @return The analog input voltage, in volts
*/
units::volt_t GetAnalogVoltage() const;
/**
* Disable the compressor.
@@ -115,7 +122,8 @@ class Compressor : public wpi::Sendable,
* @param minAnalogVoltage The minimum voltage to enable compressor
* @param maxAnalogVoltage The maximum voltage to disable compressor
*/
void EnableAnalog(double minAnalogVoltage, double maxAnalogVoltage);
void EnableAnalog(units::volt_t minAnalogVoltage,
units::volt_t maxAnalogVoltage);
/**
* Enable compressor closed loop control using hybrid input.
@@ -125,7 +133,8 @@ class Compressor : public wpi::Sendable,
* @param minAnalogVoltage The minimum voltage to enable compressor
* @param maxAnalogVoltage The maximum voltage to disable compressor
*/
void EnableHybrid(double minAnalogVoltage, double maxAnalogVoltage);
void EnableHybrid(units::volt_t minAnalogVoltage,
units::volt_t maxAnalogVoltage);
CompressorConfigType GetConfigType() const;