51 units::pounds_per_square_inch_t minPressure,
52 units::pounds_per_square_inch_t maxPressure)
override;
63 units::pounds_per_square_inch_t minPressure,
64 units::pounds_per_square_inch_t maxPressure)
override;
186 units::pounds_per_square_inch_t
GetPressure(
int channel)
const override;
190 int reverseChannel)
override;
199 static std::shared_ptr<PneumaticsBase> GetForModule(
int module);
201 std::shared_ptr<DataStore> m_dataStore;
206 static std::unique_ptr<wpi::DenseMap<int, std::weak_ptr<DataStore>>>
208 static std::weak_ptr<DataStore>& GetDataStore(
int module);
This file defines the DenseMap class.
Class for operating a compressor connected to a pneumatics module.
Definition: Compressor.h:35
DoubleSolenoid class for running 2 channels of high voltage Digital Output on a pneumatics module.
Definition: DoubleSolenoid.h:26
Base class for pneumatics devices.
Definition: PneumaticsBase.h:25
Module class for controlling a Cross The Road Electronics Pneumatics Control Module.
Definition: PneumaticsControlModule.h:18
friend class DataStore
Definition: PneumaticsControlModule.h:195
int GetSolenoidDisabledList() const override
Get a bitmask of disabled solenoids.
bool GetCompressorShortedFault() const
Returns whether the compressor is currently shorted.
bool GetCompressorShortedStickyFault() const
Returns whether the compressor has been shorted since sticky faults were last cleared.
void FireOneShot(int index) override
Fire a single solenoid shot.
bool GetCompressorNotConnectedFault() const
Returns whether the compressor is currently disconnected.
void UnreserveSolenoids(int mask) override
Unreserve the masked solenoids.
bool GetCompressorNotConnectedStickyFault() const
Returns whether the compressor has been disconnected since sticky faults were last cleared.
bool GetCompressorCurrentTooHighFault() const
Return whether the compressor current is currently too high.
PneumaticsControlModule()
Constructs a PneumaticsControlModule with the default ID (0).
bool GetCompressor() const override
Returns whether the compressor is active or not.
bool GetSolenoidVoltageStickyFault() const
Returns whether the solenoid has reported a voltage fault since sticky faults were last cleared.
CompressorConfigType GetCompressorConfigType() const override
Returns the active compressor configuration.
bool CheckSolenoidChannel(int channel) const override
Check if a solenoid channel is valid.
int GetModuleNumber() const override
Get module number for this module.
units::volt_t GetAnalogVoltage(int channel) const override
Unsupported by the CTRE PCM.
void EnableCompressorHybrid(units::pounds_per_square_inch_t minPressure, units::pounds_per_square_inch_t maxPressure) override
Enables the compressor in digital mode.
bool GetSolenoidVoltageFault() const
Returns whether the solenoid is currently reporting a voltage fault.
DoubleSolenoid MakeDoubleSolenoid(int forwardChannel, int reverseChannel) override
Create a double solenoid object for the specified channels.
PneumaticsControlModule(int module)
Constructs a PneumaticsControlModule.
units::ampere_t GetCompressorCurrent() const override
Returns the current drawn by the compressor.
bool ReserveCompressor() override
Reserve the compressor.
void EnableCompressorDigital() override
Enables the compressor in digital mode using the digital pressure switch.
void SetSolenoids(int mask, int values) override
Sets solenoids on a pneumatics module.
int GetSolenoids() const override
Gets a bitmask of solenoid values.
void DisableCompressor() override
Disables the compressor.
bool GetPressureSwitch() const override
Returns the state of the pressure switch.
Solenoid MakeSolenoid(int channel) override
Create a solenoid object for the specified channel.
void EnableCompressorAnalog(units::pounds_per_square_inch_t minPressure, units::pounds_per_square_inch_t maxPressure) override
Enables the compressor in digital mode.
void SetOneShotDuration(int index, units::second_t duration) override
Set the duration for a single solenoid shot.
Compressor MakeCompressor() override
Create a compressor object.
void UnreserveCompressor() override
Unreserve the compressor.
units::pounds_per_square_inch_t GetPressure(int channel) const override
Unsupported by the CTRE PCM.
void ClearAllStickyFaults()
Clears all sticky faults on this device.
bool GetCompressorCurrentTooHighStickyFault() const
Returns whether the compressor current has been too high since sticky faults were last cleared.
~PneumaticsControlModule() override=default
int CheckAndReserveSolenoids(int mask) override
Check to see if the masked solenoids can be reserved, and if not reserve them.
Solenoid class for running high voltage Digital Output on a pneumatics module.
Definition: Solenoid.h:26
HAL_Handle HAL_CTREPCMHandle
Definition: Types.h:67
Definition: AprilTagPoseEstimator.h:15
CompressorConfigType
Compressor config type.
Definition: CompressorConfigType.h:11
::std::mutex mutex
Definition: mutex.h:17