106 static constexpr auto kDefaultSafetyExpiration = 100_ms;
109 units::second_t m_expiration = kDefaultSafetyExpiration;
112 bool m_enabled =
false;
The Motor Safety feature acts as a watchdog timer for an individual motor.
Definition: MotorSafety.h:25
virtual void StopMotor()=0
void Check()
Check if this motor has exceeded its timeout.
units::second_t GetExpiration() const
Retrieve the timeout value for the corresponding motor safety object.
static void CheckMotors()
Check the motors to see if any have timed out.
void SetExpiration(units::second_t expirationTime)
Set the expiration time for the corresponding motor safety object.
void SetSafetyEnabled(bool enabled)
Enable/disable motor safety for this device.
virtual std::string GetDescription() const =0
The return value from this method is printed out when an error occurs.
void Feed()
Feed the motor safety object.
bool IsSafetyEnabled() const
Return the state of the motor safety enabled flag.
MotorSafety & operator=(MotorSafety &&rhs)
MotorSafety(MotorSafety &&rhs)
bool IsAlive() const
Determine if the motor is still operating or has timed out.
static units::second_t GetFPGATimestamp()
Return the FPGA system clock time in seconds.
Definition: AprilTagFieldLayout.h:22
::std::mutex mutex
Definition: mutex.h:17