14class PWMMotorController;
Class implements the PWM generation in the FPGA.
Definition: PWM.h:34
Common base class for all PWM Motor Controllers.
Definition: PWMMotorController.h:26
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.
int GetRawValue() const
Get the PWM raw value.
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.
void SetRawValue(int rawValue)
Set the PWM raw value.
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.
std::unique_ptr< CallbackStore > RegisterRawValueCallback(NotifyCallback callback, bool initialNotify)
Register a callback to be run when the PWM raw value changes.
void SetSpeed(double speed)
Set the PWM speed.
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: AprilTagFieldLayout.h:22