mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-27 02:01:42 +00:00
[wpilib][hal] PWM Raw using microseconds (#5283)
Co-authored-by: Joe <sciencewhiz@users.noreply.github.com>
This commit is contained in:
@@ -67,29 +67,29 @@ class PWMSim {
|
||||
void SetInitialized(bool initialized);
|
||||
|
||||
/**
|
||||
* Register a callback to be run when the PWM raw value changes.
|
||||
* Register a callback to be run when the PWM pulse microsecond value changes.
|
||||
*
|
||||
* @param callback the callback
|
||||
* @param initialNotify whether to run the callback with the initial value
|
||||
* @return the CallbackStore object associated with this callback
|
||||
*/
|
||||
[[nodiscard]]
|
||||
std::unique_ptr<CallbackStore> RegisterRawValueCallback(
|
||||
std::unique_ptr<CallbackStore> RegisterPulseMicrosecondCallback(
|
||||
NotifyCallback callback, bool initialNotify);
|
||||
|
||||
/**
|
||||
* Get the PWM raw value.
|
||||
* Get the PWM pulse microsecond value.
|
||||
*
|
||||
* @return the PWM raw value
|
||||
* @return the PWM pulse microsecond value
|
||||
*/
|
||||
int GetRawValue() const;
|
||||
int32_t GetPulseMicrosecond() const;
|
||||
|
||||
/**
|
||||
* Set the PWM raw value.
|
||||
* Set the PWM pulse microsecond value.
|
||||
*
|
||||
* @param rawValue the PWM raw value
|
||||
* @param microsecondPulseTime the PWM pulse microsecond value
|
||||
*/
|
||||
void SetRawValue(int rawValue);
|
||||
void SetPulseMicrosecond(int32_t microsecondPulseTime);
|
||||
|
||||
/**
|
||||
* Register a callback to be run when the PWM speed changes.
|
||||
|
||||
Reference in New Issue
Block a user