[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:
Thad House
2025-03-20 19:23:22 -07:00
committed by GitHub
parent 2e21a41f87
commit e2cc9e0059
96 changed files with 1037 additions and 2453 deletions

View File

@@ -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")

View File

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