mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-02 02:51:42 +00:00
[hal, wpilib] PWM Rewrite (#7845)
The HAL will only contain the output period and the raw microseconds. Higher level things such as SimDevice can handle everything else.
This commit is contained in:
@@ -265,11 +265,8 @@ PWMs may be used to control either motor controllers or servos. Typically only
|
||||
| Data Key | Type | Description |
|
||||
| ------------------- | ------- | ------------------------------------------ |
|
||||
| ``"<init"`` | Boolean | If PWM is initialized in the robot program |
|
||||
| ``"<speed"`` | Float | Speed, -1.0 to 1.0 range |
|
||||
| ``"<position"`` | Float | Servo position, 0.0 to 1.0 range |
|
||||
| ``"<raw"`` | Integer | The pulse time in microseconds |
|
||||
| ``"<period_scale"`` | Integer | Scales the PWM signal by squelching setting a 2-bit mask of outputs to squelch (ex. `1` -> squelch every other value; `3` -> squelch 3 of 4 values) |
|
||||
| ``"<zero_latch"`` | Boolean | Whether the PWM should be latched to 0 |
|
||||
| ``"<output_period"``| Integer | Scales the PWM signal by squelching setting a 2-bit mask of outputs to squelch (ex. `1` -> squelch every other value; `3` -> squelch 3 of 4 values) |
|
||||
|
||||
#### Solenoid Output ("Solenoid")
|
||||
|
||||
|
||||
@@ -505,25 +505,12 @@ components:
|
||||
<init:
|
||||
type: boolean
|
||||
description: "If PWM is initialized in the robot program"
|
||||
<speed:
|
||||
type: number
|
||||
description: "Speed"
|
||||
minimum: -1.0
|
||||
maximum: 1.0
|
||||
<position:
|
||||
type: number
|
||||
description: "Servo position"
|
||||
minimum: 0.0
|
||||
maximum: 1.0
|
||||
"<raw":
|
||||
type: integer
|
||||
description: "The pulse time in microseconds"
|
||||
"<period_scale":
|
||||
"<output_period":
|
||||
type: integer
|
||||
description: "Scales the PWM signal by squelching setting a 2-bit mask of outputs to squelch (ex. `1` -> squelch every other value; `3` -> squelch 3 of 4 values)"
|
||||
"<zero_latch":
|
||||
type: boolean
|
||||
description: "Whether the PWM should be latched to 0"
|
||||
|
||||
solenoidData:
|
||||
type: object
|
||||
|
||||
Reference in New Issue
Block a user