13 #include <HAL/Types.h> 15 #include "LiveWindow/LiveWindowSendable.h" 16 #include "SensorBase.h" 17 #include "networktables/NetworkTableEntry.h" 37 explicit Compressor(
int pcmID = GetDefaultSolenoidModule());
63 void InitTable(std::shared_ptr<nt::NetworkTable> subTable)
override;
66 HAL_CompressorHandle m_compressorHandle;
69 void SetCompressor(
bool on);
74 NT_EntryListener m_enabledListener = 0;
bool GetCompressorNotConnectedStickyFault() const
Query if the compressor output does not appear to be wired (sticky).
Definition: Compressor.cpp:256
bool GetCompressorCurrentTooHighStickyFault() const
Query if the compressor output has been disabled due to high current draw (sticky).
Definition: Compressor.cpp:188
void SetClosedLoopControl(bool on)
Enables or disables automatically turning the compressor on when the pressure is low.
Definition: Compressor.cpp:126
Live Window Sendable is a special type of object sendable to the live window.
Definition: LiveWindowSendable.h:17
void StopLiveWindowMode() override
Stop having this sendable object automatically respond to value changes.
Definition: Compressor.cpp:331
bool GetClosedLoopControl() const
Returns true if the compressor will automatically turn on when the pressure is low.
Definition: Compressor.cpp:144
Base class for all sensors.
Definition: SensorBase.h:20
bool GetPressureSwitchValue() const
Check if the pressure switch is triggered.
Definition: Compressor.cpp:86
double GetCompressorCurrent() const
Query how much current the compressor is drawing.
Definition: Compressor.cpp:105
Class for operating a compressor connected to a PCM (Pneumatic Control Module).
Definition: Compressor.h:34
bool GetCompressorCurrentTooHighFault() const
Query if the compressor output has been disabled due to high current draw.
Definition: Compressor.cpp:164
Compressor(int pcmID=GetDefaultSolenoidModule())
Constructor.
Definition: Compressor.cpp:24
bool Enabled() const
Check if compressor output is active.
Definition: Compressor.cpp:67
bool GetCompressorShortedFault() const
Query if the compressor output has been disabled due to a short circuit.
Definition: Compressor.cpp:233
virtual ~Compressor()
Destructor.
Definition: Compressor.cpp:40
bool GetCompressorShortedStickyFault() const
Query if the compressor output has been disabled due to a short circuit (sticky). ...
Definition: Compressor.cpp:213
bool GetCompressorNotConnectedFault() const
Query if the compressor output does not appear to be wired.
Definition: Compressor.cpp:276
void StartLiveWindowMode() override
Start having this sendable object automatically respond to value changes reflect the value on the tab...
Definition: Compressor.cpp:317
void InitTable(std::shared_ptr< nt::NetworkTable > subTable) override
Initializes a table for this sendable object.
Definition: Compressor.cpp:340
void UpdateTable() override
Update the table for this sendable object with the latest values.
Definition: Compressor.cpp:311
NetworkTables Entry.
Definition: NetworkTableEntry.h:30
std::string GetSmartDashboardType() const override
Definition: Compressor.cpp:338
void Start()
Starts closed-loop control.
Definition: Compressor.cpp:48
void ClearAllPCMStickyFaults()
Clear ALL sticky faults inside PCM that Compressor is wired to.
Definition: Compressor.cpp:300
void Stop()
Stops closed-loop control.
Definition: Compressor.cpp:57