55 wpi::units::pounds_per_square_inch_t minPressure,
56 wpi::units::pounds_per_square_inch_t maxPressure)
override;
67 wpi::units::pounds_per_square_inch_t minPressure,
68 wpi::units::pounds_per_square_inch_t maxPressure)
override;
190 wpi::units::pounds_per_square_inch_t
GetPressure(
int channel)
const override;
194 int reverseChannel)
override;
197 void ReportUsage(std::string_view device, std::string_view data)
override;
205 static std::shared_ptr<PneumaticsBase> GetForModule(
int busId,
int module);
207 std::shared_ptr<DataStore> m_dataStore;
212 static std::unique_ptr<wpi::util::DenseMap<int, std::weak_ptr<DataStore>>[]>
214 static std::weak_ptr<DataStore>& GetDataStore(
int busId,
int module);
This file defines the DenseMap class.
@ index
Definition base.h:690
Class for operating a compressor connected to a pneumatics module.
Definition Compressor.hpp:34
DoubleSolenoid class for running 2 channels of high voltage Digital Output on a pneumatics module.
Definition DoubleSolenoid.hpp:25
friend class DataStore
Definition PneumaticsControlModule.hpp:201
void SetSolenoids(int mask, int values) override
Sets solenoids on a pneumatics module.
int GetSolenoidDisabledList() const override
Get a bitmask of disabled solenoids.
void SetOneShotDuration(int index, wpi::units::second_t duration) override
Set the duration for a single solenoid shot.
void EnableCompressorDigital() override
Enables the compressor in digital mode using the digital pressure switch.
bool GetCompressorCurrentTooHighStickyFault() const
Returns whether the compressor current has been too high since sticky faults were last cleared.
~PneumaticsControlModule() override=default
void FireOneShot(int index) override
Fire a single solenoid shot.
void EnableCompressorHybrid(wpi::units::pounds_per_square_inch_t minPressure, wpi::units::pounds_per_square_inch_t maxPressure) override
Enables the compressor in digital mode.
bool GetSolenoidVoltageStickyFault() const
Returns whether the solenoid has reported a voltage fault since sticky faults were last cleared.
bool GetCompressorNotConnectedFault() const
Returns whether the compressor is currently disconnected.
void ReportUsage(std::string_view device, std::string_view data) override
Report usage.
bool GetPressureSwitch() const override
Returns the state of the pressure switch.
int GetModuleNumber() const override
Get module number for this module.
bool GetCompressorShortedFault() const
Returns whether the compressor is currently shorted.
friend class PneumaticsBase
Definition PneumaticsControlModule.hpp:202
bool GetSolenoidVoltageFault() const
Returns whether the solenoid is currently reporting a voltage fault.
void ClearAllStickyFaults()
Clears all sticky faults on this device.
CompressorConfigType GetCompressorConfigType() const override
Returns the active compressor configuration.
wpi::units::ampere_t GetCompressorCurrent() const override
Returns the current drawn by the compressor.
void UnreserveCompressor() override
Unreserve the compressor.
void EnableCompressorAnalog(wpi::units::pounds_per_square_inch_t minPressure, wpi::units::pounds_per_square_inch_t maxPressure) override
Enables the compressor in digital mode.
bool GetCompressorNotConnectedStickyFault() const
Returns whether the compressor has been disconnected since sticky faults were last cleared.
int GetSolenoids() const override
Gets a bitmask of solenoid values.
wpi::units::volt_t GetAnalogVoltage(int channel) const override
Unsupported by the CTRE PCM.
Solenoid MakeSolenoid(int channel) override
Create a solenoid object for the specified channel.
wpi::units::pounds_per_square_inch_t GetPressure(int channel) const override
Unsupported by the CTRE PCM.
Compressor MakeCompressor() override
Create a compressor object.
PneumaticsControlModule(int busId)
Constructs a PneumaticsControlModule with the default ID (0).
bool GetCompressor() const override
Returns whether the compressor is active or not.
bool CheckSolenoidChannel(int channel) const override
Check if a solenoid channel is valid.
int CheckAndReserveSolenoids(int mask) override
Check to see if the solenoids marked in the bitmask can be reserved, and if so, reserve them.
bool GetCompressorShortedStickyFault() const
Returns whether the compressor has been shorted since sticky faults were last cleared.
PneumaticsControlModule(int busId, int module)
Constructs a PneumaticsControlModule.
DoubleSolenoid MakeDoubleSolenoid(int forwardChannel, int reverseChannel) override
Create a double solenoid object for the specified channels.
void UnreserveSolenoids(int mask) override
Unreserve the solenoids marked in the bitmask.
bool ReserveCompressor() override
Reserve the compressor.
void DisableCompressor() override
Disables the compressor.
bool GetCompressorCurrentTooHighFault() const
Return whether the compressor current is currently too high.
Solenoid class for running high voltage Digital Output on a pneumatics module.
Definition Solenoid.hpp:26
HAL_Handle HAL_CTREPCMHandle
Definition Types.h:67
::std::mutex mutex
Definition mutex.hpp:17
Definition CvSource.hpp:15
CompressorConfigType
Compressor config type.
Definition CompressorConfigType.hpp:11