14 #include "ErrorBase.h" 25 enum RumbleType { kLeftRumble, kRightRumble };
32 kXInputArcadeStick = 3,
33 kXInputFlightStick = 4,
39 kXInputArcadePad = 19,
47 enum JoystickHand { kLeftHand = 0, kRightHand = 1 };
52 virtual double GetX(JoystickHand hand = kRightHand)
const = 0;
53 virtual double GetY(JoystickHand hand = kRightHand)
const = 0;
60 int GetPOV(
int pov = 0)
const;
66 GenericHID::HIDType
GetType()
const;
72 void SetOutput(
int outputNumber,
bool value);
74 void SetRumble(RumbleType type,
double value);
80 uint16_t m_leftRumble = 0;
81 uint16_t m_rightRumble = 0;
Definition: RobotController.cpp:14
int GetButtonCount() const
Get the number of buttons for the HID.
Definition: GenericHID.cpp:100
int GetPort() const
Get the port number of the HID.
Definition: GenericHID.cpp:134
int GetAxisType(int axis) const
Get the axis type of a joystick axis.
Definition: GenericHID.cpp:125
std::string GetName() const
Get the name of the HID.
Definition: GenericHID.cpp:118
int GetPOV(int pov=0) const
Get the angle in degrees of a POV on the HID.
Definition: GenericHID.cpp:79
bool GetRawButtonReleased(int button)
Whether the button was released since the last check.
Definition: GenericHID.cpp:56
Provide access to the network communication data to / from the Driver Station.
Definition: DriverStation.h:34
void SetOutput(int outputNumber, bool value)
Set a single HID output value for the HID.
Definition: GenericHID.cpp:143
int GetPOVCount() const
Get the number of POVs for the HID.
Definition: GenericHID.cpp:93
double GetRawAxis(int axis) const
Get the value of the axis.
Definition: GenericHID.cpp:66
bool GetRawButton(int button) const
Get the button value (starting at button 1).
Definition: GenericHID.cpp:34
Base class for most objects.
Definition: ErrorBase.h:74
bool GetRawButtonPressed(int button)
Whether the button was pressed since the last check.
Definition: GenericHID.cpp:45
void SetOutputs(int value)
Set all output values for the HID.
Definition: GenericHID.cpp:155
GenericHID Interface.
Definition: GenericHID.h:23
GenericHID::HIDType GetType() const
Get the type of the HID.
Definition: GenericHID.cpp:109
int GetAxisCount() const
Get the number of axes for the HID.
Definition: GenericHID.cpp:86
void SetRumble(RumbleType type, double value)
Set the rumble output for the HID.
Definition: GenericHID.cpp:168