12 #include <support/mutex.h> 14 #include "ErrorBase.h" 44 mutable wpi::mutex m_thisMutex;
50 static std::set<MotorSafetyHelper*> m_helperList;
53 static wpi::mutex m_listMutex;
Definition: RobotController.cpp:14
void SetSafetyEnabled(bool enabled)
Enable/disable motor safety for this device.
Definition: MotorSafetyHelper.cpp:128
void Feed()
Feed the motor safety object.
Definition: MotorSafetyHelper.cpp:55
Definition: MotorSafety.h:16
bool IsSafetyEnabled() const
Return the state of the motor safety enabled flag.
Definition: MotorSafetyHelper.cpp:140
Definition: MotorSafetyHelper.h:20
double GetExpiration() const
Retrieve the timeout value for the corresponding motor safety object.
Definition: MotorSafetyHelper.cpp:75
void Check()
Check if this motor has exceeded its timeout.
Definition: MotorSafetyHelper.cpp:98
bool IsAlive() const
Determine if the motor is still operating or has timed out.
Definition: MotorSafetyHelper.cpp:86
void SetExpiration(double expirationTime)
Set the expiration time for the corresponding motor safety object.
Definition: MotorSafetyHelper.cpp:65
static void CheckMotors()
Check the motors to see if any have timed out.
Definition: MotorSafetyHelper.cpp:151
Base class for most objects.
Definition: ErrorBase.h:74
MotorSafetyHelper(MotorSafety *safeObject)
The constructor for a MotorSafetyHelper object.
Definition: MotorSafetyHelper.cpp:35