14class PWMMotorController;
Class implements the PWM generation in the FPGA.
Definition: PWM.h:26
Common base class for all PWM Motor Controllers.
Definition: PWMMotorController.h:35
Class to control a simulated PWM output.
Definition: PWMSim.h:21
PWMSim(const PWM &pwm)
Constructs from a PWM object.
double GetSpeed() const
Get the PWM speed.
void SetPeriodScale(int periodScale)
Set the PWM period scale.
void SetInitialized(bool initialized)
Define whether the PWM has been initialized.
bool GetInitialized() const
Check whether the PWM has been initialized.
double GetPosition() const
Get the PWM position.
std::unique_ptr< CallbackStore > RegisterPeriodScaleCallback(NotifyCallback callback, bool initialNotify)
Register a callback to be run when the PWM period scale changes.
std::unique_ptr< CallbackStore > RegisterSpeedCallback(NotifyCallback callback, bool initialNotify)
Register a callback to be run when the PWM speed changes.
PWMSim(const PWMMotorController &motorctrl)
Constructs from a PWMMotorController object.
void SetPosition(double position)
Set the PWM position.
bool GetZeroLatch() const
Check whether the PWM is zero latched.
int GetPeriodScale() const
Get the PWM period scale.
void ResetData()
Reset all simulation data.
std::unique_ptr< CallbackStore > RegisterPulseMicrosecondCallback(NotifyCallback callback, bool initialNotify)
Register a callback to be run when the PWM pulse microsecond value changes.
PWMSim(int channel)
Constructs from a PWM channel number.
std::unique_ptr< CallbackStore > RegisterInitializedCallback(NotifyCallback callback, bool initialNotify)
Register a callback to be run when the PWM is initialized.
std::unique_ptr< CallbackStore > RegisterPositionCallback(NotifyCallback callback, bool initialNotify)
Register a callback to be run when the PWM position changes.
std::unique_ptr< CallbackStore > RegisterZeroLatchCallback(NotifyCallback callback, bool initialNotify)
Register a callback to be run when the PWM zero latch state changes.
void SetPulseMicrosecond(int32_t microsecondPulseTime)
Set the PWM pulse microsecond value.
void SetSpeed(double speed)
Set the PWM speed.
int32_t GetPulseMicrosecond() const
Get the PWM pulse microsecond value.
void SetZeroLatch(bool zeroLatch)
Define whether the PWM has been zero latched.
std::function< void(std::string_view, const HAL_Value *)> NotifyCallback
Definition: CallbackStore.h:14
Definition: AprilTagPoseEstimator.h:15