[hal,wpilib] Add support for joystick outputs (#8385)

Support joystick outputs, including Rumble and LEDs.

Also requires an update to Joystick descriptors, as that has also
changed in mrccomm to support showing what outputs are supported.
This commit is contained in:
Thad House
2025-11-17 14:36:14 -08:00
committed by GitHub
parent 5db6d2f500
commit ce6fd225a6
54 changed files with 1607 additions and 854 deletions

View File

@@ -102,7 +102,9 @@ class GenericHIDSim {
*
* @param type the new device type
*/
void SetType(GenericHID::HIDType type);
void SetGamepadType(GenericHID::HIDType type);
void SetSupportedOutputs(GenericHID::SupportedOutputs supportedOutputs);
/**
* Set the name of this device.
@@ -112,19 +114,11 @@ class GenericHIDSim {
void SetName(const char* name);
/**
* Read the output of a button.
* Get the value of set LEDs.
*
* @param outputNumber the button number
* @return the value of the button (true = pressed)
* @return the led color
*/
bool GetOutput(int outputNumber);
/**
* Get the encoded 16-bit integer that passes button values.
*
* @return the button values
*/
int64_t GetOutputs();
int32_t GetLeds();
/**
* Get the joystick rumble.