[wpilib][hal] PWM Raw using microseconds (#5283)

Co-authored-by: Joe <sciencewhiz@users.noreply.github.com>
This commit is contained in:
Thad House
2023-06-22 19:43:16 -07:00
committed by GitHub
parent 1fca519fb4
commit c1a01569b4
56 changed files with 374 additions and 466 deletions

View File

@@ -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.