13 #include <HAL/Types.h> 15 #include "LiveWindow/LiveWindowSendable.h" 16 #include "SolenoidBase.h" 17 #include "networktables/NetworkTableEntry.h" 30 enum Value { kOff, kForward, kReverse };
33 DoubleSolenoid(
int moduleNumber,
int forwardChannel,
int reverseChannel);
35 virtual void Set(Value value);
36 virtual Value
Get()
const;
44 void InitTable(std::shared_ptr<nt::NetworkTable> subTable);
51 HAL_SolenoidHandle m_forwardHandle = HAL_kInvalidHandle;
52 HAL_SolenoidHandle m_reverseHandle = HAL_kInvalidHandle;
55 NT_EntryListener m_valueListener = 0;
Live Window Sendable is a special type of object sendable to the live window.
Definition: LiveWindowSendable.h:17
SolenoidBase class is the common base class for the Solenoid and DoubleSolenoid classes.
Definition: SolenoidBase.h:18
void UpdateTable()
Update the table for this sendable object with the latest values.
Definition: DoubleSolenoid.cpp:184
DoubleSolenoid class for running 2 channels of high voltage Digital Output (PCM). ...
Definition: DoubleSolenoid.h:28
virtual Value Get() const
Read the current value of the solenoid.
Definition: DoubleSolenoid.cpp:143
bool IsRevSolenoidBlackListed() const
Check if the reverse solenoid is blacklisted.
Definition: DoubleSolenoid.cpp:179
void StopLiveWindowMode()
Stop having this sendable object automatically respond to value changes.
Definition: DoubleSolenoid.cpp:217
void InitTable(std::shared_ptr< nt::NetworkTable > subTable)
Initializes a table for this sendable object.
Definition: DoubleSolenoid.cpp:229
DoubleSolenoid(int forwardChannel, int reverseChannel)
Constructor.
Definition: DoubleSolenoid.cpp:29
virtual ~DoubleSolenoid()
Destructor.
Definition: DoubleSolenoid.cpp:99
std::string GetSmartDashboardType() const
Definition: DoubleSolenoid.cpp:225
virtual void Set(Value value)
Set the value of a solenoid.
Definition: DoubleSolenoid.cpp:110
void StartLiveWindowMode()
Start having this sendable object automatically respond to value changes reflect the value on the tab...
Definition: DoubleSolenoid.cpp:200
NetworkTables Entry.
Definition: NetworkTableEntry.h:30
bool IsFwdSolenoidBlackListed() const
Check if the forward solenoid is blacklisted.
Definition: DoubleSolenoid.cpp:166