mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-26 01:51:41 +00:00
[wpilib] Document simulation APIs (#3079)
- Remove sim checkstyle suppression - Add [[nodiscard]] to C++ register callback functions - Add a couple of missing sim functions Co-authored-by: Peter Johnson <johnson.peter@gmail.com> Co-authored-by: Starlight220 <yotamshlomi@gmail.com>
This commit is contained in:
@@ -31,26 +31,86 @@ class XboxControllerSim : public GenericHIDSim {
|
||||
*/
|
||||
explicit XboxControllerSim(int port);
|
||||
|
||||
/**
|
||||
* Change the X value of the joystick.
|
||||
*
|
||||
* @param hand the joystick hand
|
||||
* @param value the new value
|
||||
*/
|
||||
void SetX(GenericHID::JoystickHand hand, double value);
|
||||
|
||||
/**
|
||||
* Change the Y value of the joystick.
|
||||
*
|
||||
* @param hand the joystick hand
|
||||
* @param value the new value
|
||||
*/
|
||||
void SetY(GenericHID::JoystickHand hand, double value);
|
||||
|
||||
/**
|
||||
* Change the value of a trigger axis on the joystick.
|
||||
*
|
||||
* @param hand the joystick hand
|
||||
* @param value the new value
|
||||
*/
|
||||
void SetTriggerAxis(GenericHID::JoystickHand hand, double value);
|
||||
|
||||
/**
|
||||
* Change the value of a bumper on the joystick.
|
||||
*
|
||||
* @param hand the joystick hand
|
||||
* @param state the new value
|
||||
*/
|
||||
void SetBumper(GenericHID::JoystickHand hand, bool state);
|
||||
|
||||
/**
|
||||
* Change the value of a button on the joystick.
|
||||
*
|
||||
* @param hand the joystick hand
|
||||
* @param state the new value
|
||||
*/
|
||||
void SetStickButton(GenericHID::JoystickHand hand, bool state);
|
||||
|
||||
/**
|
||||
* Change the value of the A button.
|
||||
*
|
||||
* @param state the new value
|
||||
*/
|
||||
void SetAButton(bool state);
|
||||
|
||||
/**
|
||||
* Change the value of the B button.
|
||||
*
|
||||
* @param state the new value
|
||||
*/
|
||||
void SetBButton(bool state);
|
||||
|
||||
/**
|
||||
* Change the value of the X button.
|
||||
*
|
||||
* @param state the new value
|
||||
*/
|
||||
void SetXButton(bool state);
|
||||
|
||||
/**
|
||||
* Change the value of the Y button.
|
||||
*
|
||||
* @param state the new value
|
||||
*/
|
||||
void SetYButton(bool state);
|
||||
|
||||
/**
|
||||
* Change the value of the Back button.
|
||||
*
|
||||
* @param state the new value
|
||||
*/
|
||||
void SetBackButton(bool state);
|
||||
|
||||
/**
|
||||
* Change the value of the Start button.
|
||||
*
|
||||
* @param state the new value
|
||||
*/
|
||||
void SetStartButton(bool state);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user