10 #include <hal/Types.h>
12 #include "frc/ErrorBase.h"
13 #include "frc/SensorUtil.h"
14 #include "frc/smartdashboard/SendableBase.h"
169 HAL_CompressorHandle m_compressorHandle;
172 void SetCompressor(
bool on);
void ClearAllPCMStickyFaults()
Clear ALL sticky faults inside PCM that Compressor is wired to.
double GetCompressorCurrent() const
Query how much current the compressor is drawing.
Definition: SPIAccelerometerSim.h:18
bool GetPressureSwitchValue() const
Check if the pressure switch is triggered.
static int GetDefaultSolenoidModule()
Get the number of the default solenoid module.
bool Enabled() const
Check if compressor output is active.
bool GetCompressorShortedStickyFault() const
Query if the compressor output has been disabled due to a short circuit (sticky). ...
void InitSendable(SendableBuilder &builder) override
Initializes this Sendable object.
Class for operating a compressor connected to a PCM (Pneumatic Control Module).
Definition: Compressor.h:33
void Stop()
Stops closed-loop control.
bool GetCompressorCurrentTooHighFault() const
Query if the compressor output has been disabled due to high current draw.
bool GetCompressorCurrentTooHighStickyFault() const
Query if the compressor output has been disabled due to high current draw (sticky).
bool GetCompressorNotConnectedFault() const
Query if the compressor output does not appear to be wired.
bool GetCompressorShortedFault() const
Query if the compressor output has been disabled due to a short circuit.
Base class for most objects.
Definition: ErrorBase.h:74
Compressor(int pcmID=SensorUtil::GetDefaultSolenoidModule())
Constructor.
Definition: SendableBase.h:19
Definition: SendableBuilder.h:23
bool GetCompressorNotConnectedStickyFault() const
Query if the compressor output does not appear to be wired (sticky).
void Start()
Starts closed-loop control.
void SetClosedLoopControl(bool on)
Enables or disables automatically turning the compressor on when the pressure is low.
bool GetClosedLoopControl() const
Returns true if the compressor will automatically turn on when the pressure is low.