Class to write to digital outputs.
Definition: DigitalOutput.h:25
Class to control a simulated digital PWM output.
Definition: DigitalPWMSim.h:23
DigitalPWMSim(const DigitalOutput &digitalOutput)
Constructs from a DigitalOutput object.
std::unique_ptr< CallbackStore > RegisterPinCallback(NotifyCallback callback, bool initialNotify)
Register a callback to be run whenever the pin changes.
void ResetData()
Reset all simulation data.
std::unique_ptr< CallbackStore > RegisterDutyCycleCallback(NotifyCallback callback, bool initialNotify)
Register a callback to be run whenever the duty cycle value changes.
void SetDutyCycle(double dutyCycle)
Set the duty cycle value of this PWM output.
std::unique_ptr< CallbackStore > RegisterInitializedCallback(NotifyCallback callback, bool initialNotify)
Register a callback to be run when this PWM output is initialized.
void SetPin(int pin)
Change the pin number.
static DigitalPWMSim CreateForChannel(int channel)
Creates an DigitalPWMSim for a digital I/O channel.
static DigitalPWMSim CreateForIndex(int index)
Creates an DigitalPWMSim for a simulated index.
double GetDutyCycle() const
Read the duty cycle value.
bool GetInitialized() const
Check whether this PWM output has been initialized.
void SetInitialized(bool initialized)
Define whether this PWM output has been initialized.
int GetPin() const
Check the pin number.
std::function< void(std::string_view, const HAL_Value *)> NotifyCallback
Definition: CallbackStore.h:14
Definition: AprilTagPoseEstimator.h:15