56 units::pounds_per_square_inch_t minPressure,
57 units::pounds_per_square_inch_t maxPressure)
override;
86 units::pounds_per_square_inch_t minPressure,
87 units::pounds_per_square_inch_t maxPressure)
override;
119 int reverseChannel)
override;
243 units::pounds_per_square_inch_t
GetPressure(
int channel)
const override;
251 static std::shared_ptr<PneumaticsBase> GetForModule(
int module);
253 std::shared_ptr<DataStore> m_dataStore;
258 static std::unique_ptr<wpi::DenseMap<int, std::weak_ptr<DataStore>>>
260 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
Module class for controlling a REV Robotics Pneumatic Hub.
Definition: PneumaticHub.h:18
friend class DataStore
Definition: PneumaticHub.h:247
units::pounds_per_square_inch_t GetPressure(int channel) const override
Returns the pressure read by an analog pressure sensor on the specified analog input channel.
void DisableCompressor() override
Disables the compressor.
void UnreserveCompressor() override
Unreserve the compressor.
int GetSolenoidDisabledList() const override
Get a bitmask of disabled solenoids.
units::volt_t GetAnalogVoltage(int channel) const override
Returns the raw voltage of the specified analog input channel.
void EnableCompressorHybrid(units::pounds_per_square_inch_t minPressure, units::pounds_per_square_inch_t maxPressure) override
Enables the compressor in hybrid mode.
units::ampere_t GetSolenoidsTotalCurrent() const
Returns the total current drawn by all solenoids.
units::volt_t Get5VRegulatedVoltage() const
Returns the current voltage of the regulated 5v supply.
void SetOneShotDuration(int index, units::second_t duration) override
Set the duration for a single solenoid shot.
bool ReserveCompressor() override
Reserve the compressor.
bool GetPressureSwitch() const override
Returns the state of the pressure switch.
int GetModuleNumber() const override
Get module number for this module.
units::volt_t GetSolenoidsVoltage() const
Returns the current voltage of the solenoid power supply.
void EnableCompressorAnalog(units::pounds_per_square_inch_t minPressure, units::pounds_per_square_inch_t maxPressure) override
Enables the compressor in analog mode.
bool CheckSolenoidChannel(int channel) const override
Check if a solenoid channel is valid.
Solenoid MakeSolenoid(int channel) override
Create a solenoid object for the specified channel.
bool GetCompressor() const override
Returns whether the compressor is active or not.
void ClearStickyFaults()
Clears the sticky faults.
CompressorConfigType GetCompressorConfigType() const override
Returns the active compressor configuration.
~PneumaticHub() override=default
Version GetVersion() const
Returns the hardware and firmware versions of this device.
units::ampere_t GetCompressorCurrent() const override
Returns the current drawn by the compressor.
Compressor MakeCompressor() override
Create a compressor object.
Faults GetFaults() const
Returns the faults currently active on this device.
void SetSolenoids(int mask, int values) override
Sets solenoids on a pneumatics module.
DoubleSolenoid MakeDoubleSolenoid(int forwardChannel, int reverseChannel) override
Create a double solenoid object for the specified channels.
StickyFaults GetStickyFaults() const
Returns the sticky faults currently active on this device.
PneumaticHub(int module)
Constructs a PneumaticHub.
void FireOneShot(int index) override
Fire a single solenoid shot.
void UnreserveSolenoids(int mask) override
Unreserve the masked solenoids.
void EnableCompressorDigital() override
Enables the compressor in digital mode using the digital pressure switch.
PneumaticHub()
Constructs a PneumaticHub with the default ID (1).
units::volt_t GetInputVoltage() const
Returns the current input voltage for this device.
int CheckAndReserveSolenoids(int mask) override
Check to see if the masked solenoids can be reserved, and if not reserve them.
int GetSolenoids() const override
Gets a bitmask of solenoid values.
Base class for pneumatics devices.
Definition: PneumaticsBase.h:25
Solenoid class for running high voltage Digital Output on a pneumatics module.
Definition: Solenoid.h:26
HAL_Handle HAL_REVPHHandle
Definition: Types.h:71
Definition: AprilTagPoseEstimator.h:15
CompressorConfigType
Compressor config type.
Definition: CompressorConfigType.h:11
Definition: PneumaticHub.h:138
uint32_t CanWarning
Definition: PneumaticHub.h:159
uint32_t Channel1Fault
Definition: PneumaticHub.h:140
uint32_t HardwareFault
Definition: PneumaticHub.h:160
uint32_t Channel9Fault
Definition: PneumaticHub.h:148
uint32_t Channel2Fault
Definition: PneumaticHub.h:141
uint32_t Channel13Fault
Definition: PneumaticHub.h:152
uint32_t CompressorOpen
Definition: PneumaticHub.h:156
uint32_t Channel10Fault
Definition: PneumaticHub.h:149
uint32_t Channel0Fault
Definition: PneumaticHub.h:139
uint32_t Brownout
Definition: PneumaticHub.h:158
uint32_t CompressorOverCurrent
Definition: PneumaticHub.h:155
uint32_t Channel14Fault
Definition: PneumaticHub.h:153
uint32_t Channel8Fault
Definition: PneumaticHub.h:147
uint32_t Channel12Fault
Definition: PneumaticHub.h:151
uint32_t SolenoidOverCurrent
Definition: PneumaticHub.h:157
uint32_t Channel3Fault
Definition: PneumaticHub.h:142
bool GetChannelFault(int channel) const
Gets whether there is a fault at the specified channel.
uint32_t Channel7Fault
Definition: PneumaticHub.h:146
uint32_t Channel15Fault
Definition: PneumaticHub.h:154
uint32_t Channel6Fault
Definition: PneumaticHub.h:145
uint32_t Channel11Fault
Definition: PneumaticHub.h:150
uint32_t Channel4Fault
Definition: PneumaticHub.h:143
uint32_t Channel5Fault
Definition: PneumaticHub.h:144
Definition: PneumaticHub.h:179
uint32_t CanBusOff
Definition: PneumaticHub.h:185
uint32_t CompressorOpen
Definition: PneumaticHub.h:181
uint32_t SolenoidOverCurrent
Definition: PneumaticHub.h:182
uint32_t Brownout
Definition: PneumaticHub.h:183
uint32_t CanWarning
Definition: PneumaticHub.h:184
uint32_t HasReset
Definition: PneumaticHub.h:186
uint32_t CompressorOverCurrent
Definition: PneumaticHub.h:180
Definition: PneumaticHub.h:122
uint32_t HardwareMinor
Definition: PneumaticHub.h:126
uint32_t FirmwareFix
Definition: PneumaticHub.h:125
uint32_t FirmwareMinor
Definition: PneumaticHub.h:124
uint32_t HardwareMajor
Definition: PneumaticHub.h:127
uint32_t UniqueId
Definition: PneumaticHub.h:128
uint32_t FirmwareMajor
Definition: PneumaticHub.h:123
::std::mutex mutex
Definition: mutex.h:17