mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-03 03:01:44 +00:00
[sim] Add joystick simulation support (#2595)
This adds joystick functions to DriverStationSim, and new GenericHIDSim, JoystickSim, and XboxControllerSim classes.
This commit is contained in:
@@ -58,6 +58,25 @@ class DriverStationData {
|
||||
|
||||
void NotifyNewData();
|
||||
|
||||
void SetJoystickButton(int32_t stick, int32_t button, HAL_Bool state);
|
||||
void SetJoystickAxis(int32_t stick, int32_t axis, double value);
|
||||
void SetJoystickPOV(int32_t stick, int32_t pov, int32_t value);
|
||||
void SetJoystickButtons(int32_t stick, uint32_t buttons);
|
||||
void SetJoystickAxisCount(int32_t stick, int32_t count);
|
||||
void SetJoystickPOVCount(int32_t stick, int32_t count);
|
||||
void SetJoystickButtonCount(int32_t stick, int32_t count);
|
||||
|
||||
void SetJoystickIsXbox(int32_t stick, HAL_Bool isXbox);
|
||||
void SetJoystickType(int32_t stick, int32_t type);
|
||||
void SetJoystickName(int32_t stick, const char* name);
|
||||
void SetJoystickAxisType(int32_t stick, int32_t axis, int32_t type);
|
||||
|
||||
void SetGameSpecificMessage(const char* message);
|
||||
void SetEventName(const char* name);
|
||||
void SetMatchType(HAL_MatchType type);
|
||||
void SetMatchNumber(int32_t matchNumber);
|
||||
void SetReplayNumber(int32_t replayNumber);
|
||||
|
||||
SimDataValue<HAL_Bool, HAL_MakeBoolean, GetEnabledName> enabled{false};
|
||||
SimDataValue<HAL_Bool, HAL_MakeBoolean, GetAutonomousName> autonomous{false};
|
||||
SimDataValue<HAL_Bool, HAL_MakeBoolean, GetTestName> test{false};
|
||||
|
||||
Reference in New Issue
Block a user