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