[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:
Peter Johnson
2021-01-11 21:55:45 -08:00
committed by GitHub
parent 26584ff145
commit 9c3b51ca0f
64 changed files with 4516 additions and 199 deletions

View File

@@ -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);
};