10 #include "GenericHID.h"
11 #include "ErrorBase.h"
24 static const uint32_t kDefaultXAxis = 1;
25 static const uint32_t kDefaultYAxis = 2;
26 static const uint32_t kDefaultZAxis = 3;
27 static const uint32_t kDefaultTwistAxis = 4;
28 static const uint32_t kDefaultThrottleAxis = 3;
31 kXAxis, kYAxis, kZAxis, kTwistAxis, kThrottleAxis, kNumAxisTypes
33 static const uint32_t kDefaultTriggerButton = 1;
34 static const uint32_t kDefaultTopButton = 2;
37 kTriggerButton, kTopButton, kNumButtonTypes
41 Joystick(uint32_t port, uint32_t numAxisTypes, uint32_t numButtonTypes);
47 virtual float GetX(JoystickHand hand = kRightHand);
48 virtual float GetY(JoystickHand hand = kRightHand);
52 virtual float GetAxis(AxisType axis);
55 virtual bool GetTrigger(JoystickHand hand = kRightHand);
56 virtual bool GetTop(JoystickHand hand = kRightHand);
57 virtual bool GetBumper(JoystickHand hand = kRightHand);
58 virtual bool GetButton(ButtonType button);
60 static Joystick* GetStickForPort(uint32_t port);
68 void InitJoystick(uint32_t numAxisTypes, uint32_t numButtonTypes);
float GetRawAxis(uint32_t axis)
Definition: Joystick.cpp:151
virtual bool GetButton(ButtonType button)
Definition: Joystick.cpp:238
virtual float GetX(JoystickHand hand=kRightHand)
Definition: Joystick.cpp:104
virtual float GetMagnitude()
Definition: Joystick.cpp:277
virtual bool GetTrigger(JoystickHand hand=kRightHand)
Definition: Joystick.cpp:188
virtual float GetTwist()
Definition: Joystick.cpp:131
virtual float GetThrottle()
Definition: Joystick.cpp:140
Definition: ErrorBase.h:37
virtual float GetDirectionRadians()
Definition: Joystick.cpp:287
Joystick(uint32_t port)
Definition: Joystick.cpp:29
Definition: Joystick.h:21
virtual float GetY(JoystickHand hand=kRightHand)
Definition: Joystick.cpp:113
bool GetRawButton(uint32_t button)
Definition: Joystick.cpp:225
virtual bool GetBumper(JoystickHand hand=kRightHand)
Definition: Joystick.cpp:210
virtual bool GetTop(JoystickHand hand=kRightHand)
Definition: Joystick.cpp:201
uint32_t GetAxisChannel(AxisType axis)
Definition: Joystick.cpp:255
virtual float GetDirectionDegrees()
Definition: Joystick.cpp:300
Definition: GenericHID.h:14
void SetAxisChannel(AxisType axis, uint32_t channel)
Definition: Joystick.cpp:266
virtual float GetAxis(AxisType axis)
Definition: Joystick.cpp:165
virtual float GetZ()
Definition: Joystick.cpp:122
Definition: DriverStation.h:21