mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-29 02:21:44 +00:00
[wpilib] Add IsJoystickConnected method (#2847)
This commit is contained in:
@@ -181,6 +181,17 @@ class DriverStation : public ErrorBase {
|
||||
*/
|
||||
int GetJoystickAxisType(int stick, int axis) const;
|
||||
|
||||
/**
|
||||
* Returns if a joystick is connected to the Driver Station.
|
||||
*
|
||||
* This makes a best effort guess by looking at the reported number of axis,
|
||||
* buttons, and POVs attached.
|
||||
*
|
||||
* @param stick The joystick port number
|
||||
* @return true if a joystick is connected
|
||||
*/
|
||||
bool IsJoystickConnected(int stick) const;
|
||||
|
||||
/**
|
||||
* Check if the DS has enabled the robot.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user