56 units::pounds_per_square_inch_t minPressure,
57 units::pounds_per_square_inch_t maxPressure)
override;
68 units::pounds_per_square_inch_t minPressure,
69 units::pounds_per_square_inch_t maxPressure)
override;
191 units::pounds_per_square_inch_t
GetPressure(
int channel)
const override;
195 int reverseChannel)
override;
198 void ReportUsage(std::string_view device, std::string_view data)
override;
206 static std::shared_ptr<PneumaticsBase> GetForModule(
int busId,
int module);
208 std::shared_ptr<DataStore> m_dataStore;
213 static std::unique_ptr<wpi::DenseMap<int, std::weak_ptr<DataStore>>[]>
215 static std::weak_ptr<DataStore>& GetDataStore(
int busId,
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:26
Module class for controlling a Cross The Road Electronics Pneumatics Control Module.
Definition PneumaticsControlModule.h:18
friend class DataStore
Definition PneumaticsControlModule.h:202
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.
PneumaticsControlModule(int busId, int module)
Constructs a PneumaticsControlModule.
bool GetCompressorNotConnectedFault() const
Returns whether the compressor is currently disconnected.
void UnreserveSolenoids(int mask) override
Unreserve the solenoids marked in the bitmask.
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.
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.
units::ampere_t GetCompressorCurrent() const override
Returns the current drawn by the compressor.
void ReportUsage(std::string_view device, std::string_view data) override
Report usage.
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.
PneumaticsControlModule(int busId)
Constructs a PneumaticsControlModule with the default ID (0).
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 solenoids marked in the bitmask can be reserved, and if so, 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:65
Definition SystemServer.h:9
CompressorConfigType
Compressor config type.
Definition CompressorConfigType.h:11
::std::mutex mutex
Definition mutex.h:17