mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-03 03:01:44 +00:00
Add new joystick features
Axis counts other than six and POVs are both present in C++ and Java now Add dynamic joystick axis counts, up to 12 Change-Id: Ieade5e61a89df822df8702cb32326e4635558778 Add support for POVs in C++ Change-Id: I12dc0fcaca605a256ddcf990eebde45767229171 Make POVs work in Java Change-Id: Ie2d98adb416c1930f058bdd21c3e7d26289df503
This commit is contained in:
@@ -42,7 +42,7 @@ public:
|
||||
virtual ~Joystick();
|
||||
|
||||
uint32_t GetAxisChannel(AxisType axis);
|
||||
void SetAxisChannel(AxisType axis, uint32_t channel);
|
||||
void SetAxisChannel(AxisType axis, uint32_t channel);
|
||||
|
||||
virtual float GetX(JoystickHand hand = kRightHand);
|
||||
virtual float GetY(JoystickHand hand = kRightHand);
|
||||
@@ -55,10 +55,11 @@ public:
|
||||
virtual bool GetTrigger(JoystickHand hand = kRightHand);
|
||||
virtual bool GetTop(JoystickHand hand = kRightHand);
|
||||
virtual bool GetBumper(JoystickHand hand = kRightHand);
|
||||
virtual bool GetButton(ButtonType button);
|
||||
bool GetRawButton(uint32_t button);
|
||||
virtual bool GetRawButton(uint32_t button);
|
||||
virtual int GetPOV(uint32_t pov = 1);
|
||||
bool GetButton(ButtonType button);
|
||||
static Joystick* GetStickForPort(uint32_t port);
|
||||
|
||||
|
||||
virtual float GetMagnitude();
|
||||
virtual float GetDirectionRadians();
|
||||
virtual float GetDirectionDegrees();
|
||||
@@ -74,4 +75,3 @@ private:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user