[sim] WebSockets Documentation Fixes (#6668)

This commit is contained in:
CoolSpy3
2024-05-27 06:52:25 -07:00
committed by GitHub
parent 98fcbdb44e
commit a6ac4228c3
2 changed files with 35 additions and 28 deletions

View File

@@ -119,7 +119,7 @@ C++/Java implementation note: these are created as either BuiltInAccelerometer o
| ``"<output_port"`` | Integer | DIO pin number |
| ``"<length"`` | Integer | The number of leds in the strip |
| ``"<running"`` | Boolean | Whether the strip is outputting data |
| ``"<data"`` | Array (See Below) | One value per led; value is an object with ``"r"``, ``"g"``, and ``"b"`` keys, representing the rgb (0-255) components of the color |
| ``"<data"`` | Array | One value per led; value is an object with ``"r"``, ``"g"``, and ``"b"`` keys, representing the rgb (0-255) components of the color |
#### Analog Input ("AI")
@@ -127,17 +127,17 @@ C++/Java implementation note: these are created as either BuiltInAccelerometer o
The basic analog input just reads a voltage. An analog input can also be configured to use an averaging and oversampling engine.
| Data Key | Type | Description |
| --------------------- | ------- | --------------------------------------------------- |
| ``"<init"`` | Boolean | If analog input is initialized in the robot program |
| ``"<avg_bits"`` | Integer | The number of averaging bits |
| ``"<oversample_bits"` | Integer | The number of oversampling bits |
| ``">voltage"`` | Float | Input voltage, in volts |
| ``"<accum_init"`` | Boolean | If the accumulator is initialized in the robot program |
| ``">accum_value"`` | Integer | The accumulated value |
| ``">accum_count"`` | Integer | The number of accumulated values |
| ``"<accum_center"`` | Integer | The center value of the accumulator |
| ``"<accum_deadband"`` | Integer | The accumulator's deadband |
| Data Key | Type | Description |
| ---------------------- | ------- | --------------------------------------------------- |
| ``"<init"`` | Boolean | If analog input is initialized in the robot program |
| ``"<avg_bits"`` | Integer | The number of averaging bits |
| ``"<oversample_bits"`` | Integer | The number of oversampling bits |
| ``">voltage"`` | Float | Input voltage, in volts |
| ``"<accum_init"`` | Boolean | If the accumulator is initialized in the robot program |
| ``">accum_value"`` | Integer | The accumulated value |
| ``">accum_count"`` | Integer | The number of accumulated values |
| ``"<accum_center"`` | Integer | The center value of the accumulator |
| ``"<accum_deadband"`` | Integer | The accumulator's deadband |
#### Analog Output ("AO")
@@ -261,12 +261,13 @@ Joystick data is an input to the robot program and should be updated for each in
| ``">axes"`` | Array of float | One array element per axis; value is -1 to 1 range |
| ``">povs"`` | Array of integer | One array element per POV; value is angle in degrees of the POV (e.g. 0, 90, 315) if pressed, or -1 if the POV is not pressed |
| ``">buttons"`` | Array of boolean | One array element per button; true if button is pressed, false if button is released |
| ``"<outputs"`` | Integer | Bitmask of joystick HID outputs |
| ``"<rumble_left"`` | Float | Left rumble, value is 0-1 range |
| ``"<rumble_right"`` | Float | Right rumble, value is 0-1 range |
#### PCM Data ("CTREPCM")
[``"CTREPCM"``]#pcm-data-ctrepcm
[``"CTREPCM"``]:#pcm-data-ctrepcm
A pneumatic control module is used to regulate the pressure in a pneumatic system by switching a compressor on or off.

View File

@@ -490,6 +490,9 @@ components:
description: "Right rumble"
minimum: 0.0
maximum: 1.0
<outputs:
type: integer
description: "Bitmask of joystick HID outputs"
pcmData:
type: object
@@ -505,21 +508,24 @@ components:
type: string
description: Device Identifier (usually channel)
data:
<init:
type: boolean
description: "If PCM is initialized in the robot program"
">on":
type: boolean
description: "Whether the compressor is running"
"<closed_loop":
type: boolean
description: "Whether closed-loop control is enabled"
">pressure_switch":
type: boolean
description: "The value of the pressure switch"
">current":
type: number
description: "The amount of current being drawn by the compressor, in Amps"
type: object
description: "PCM Output Data (type: PCM, device: module number)"
properties:
<init:
type: boolean
description: "If PCM is initialized in the robot program"
">on":
type: boolean
description: "Whether the compressor is running"
"<closed_loop":
type: boolean
description: "Whether closed-loop control is enabled"
">pressure_switch":
type: boolean
description: "The value of the pressure switch"
">current":
type: number
description: "The amount of current being drawn by the compressor, in Amps"
pwmData:
type: object