10 #include "MotorSafety.h"
12 #include "MotorSafetyHelper.h"
27 explicit SafePWM(uint32_t channel);
36 void GetDescription(std::ostringstream& desc)
const;
41 std::unique_ptr<MotorSafetyHelper> m_safetyHelper;
SafePWM(uint32_t channel)
Constructor for a SafePWM object taking a channel number.
Definition: SafePWM.cpp:15
bool IsSafetyEnabled() const
Check if motor safety is enabled for this object.
Definition: SafePWM.cpp:63
Definition: MotorSafety.h:14
Class implements the PWM generation in the FPGA.
Definition: PWM.h:34
A safe version of the PWM class.
Definition: SafePWM.h:25
void SetSafetyEnabled(bool enabled)
Enable/disable motor safety for this device Turn on and off the motor safety option for this PWM obje...
Definition: SafePWM.cpp:55
void SetExpiration(float timeout)
Set the expiration time for the PWM object.
Definition: SafePWM.cpp:24
virtual void SetSpeed(float speed)
Feed the MotorSafety timer when setting the speed.
Definition: SafePWM.cpp:78
bool IsAlive() const
Check if the PWM object is currently alive or stopped due to a timeout.
Definition: SafePWM.cpp:40
void StopMotor()
Stop the motor associated with this PWM object.
Definition: SafePWM.cpp:48
float GetExpiration() const
Return the expiration time for the PWM object.
Definition: SafePWM.cpp:32