mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
[wpilib] Use PSI for compressor config and sensor reading (#3847)
This adds the REV Analog Pressure Sensor PSI to volt (and vice versa) conversion to allow setting the compressor config in PSI and getting the sensor reading in PSI. Also adds input validation for pressure values at the higher level. Co-authored-by: Tyler Veness <calcmogul@gmail.com>
This commit is contained in:
committed by
GitHub
parent
f401ea9aae
commit
7c09f44898
@@ -26,11 +26,13 @@ class PneumaticsControlModule : public PneumaticsBase {
|
||||
|
||||
void EnableCompressorDigital() override;
|
||||
|
||||
void EnableCompressorAnalog(units::volt_t minAnalogVoltage,
|
||||
units::volt_t maxAnalogVoltage) override;
|
||||
void EnableCompressorAnalog(
|
||||
units::pounds_per_square_inch_t minPressure,
|
||||
units::pounds_per_square_inch_t maxPressure) override;
|
||||
|
||||
void EnableCompressorHybrid(units::volt_t minAnalogVoltage,
|
||||
units::volt_t maxAnalogVoltage) override;
|
||||
void EnableCompressorHybrid(
|
||||
units::pounds_per_square_inch_t minPressure,
|
||||
units::pounds_per_square_inch_t maxPressure) override;
|
||||
|
||||
CompressorConfigType GetCompressorConfigType() const override;
|
||||
|
||||
@@ -74,6 +76,8 @@ class PneumaticsControlModule : public PneumaticsBase {
|
||||
|
||||
units::volt_t GetAnalogVoltage(int channel) const override;
|
||||
|
||||
units::pounds_per_square_inch_t GetPressure(int channel) const override;
|
||||
|
||||
Solenoid MakeSolenoid(int channel) override;
|
||||
DoubleSolenoid MakeDoubleSolenoid(int forwardChannel,
|
||||
int reverseChannel) override;
|
||||
|
||||
Reference in New Issue
Block a user