mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-05 03:21:42 +00:00
[wpilib] Add PS4Controller, remove Hand from GenericHID/XboxController (#3345)
- GenericHID is now concrete, and has only getRawAxis/Button(int) functionality - getXxx() has been moved into Joystick as that's the only place where it makes sense - Hand (and therefore getXxx(Hand)) has been removed, replaced by specific getLeft/RightXxx() methods in XboxController and the new PS4Controller class - C++ ::Button:: and ::Axis:: enums have been converted to identically-namespaced static constexpr ints
This commit is contained in:
@@ -119,24 +119,18 @@ class Joystick : public GenericHID {
|
||||
int GetThrottleChannel() const;
|
||||
|
||||
/**
|
||||
* Get the X value of the joystick.
|
||||
* Get the X value of the current joystick.
|
||||
*
|
||||
* This depends on the mapping of the joystick connected to the current port.
|
||||
*
|
||||
* @param hand This parameter is ignored for the Joystick class and is only
|
||||
* here to complete the GenericHID interface.
|
||||
*/
|
||||
double GetX(JoystickHand hand = kRightHand) const override;
|
||||
double GetX() const;
|
||||
|
||||
/**
|
||||
* Get the Y value of the joystick.
|
||||
* Get the Y value of the current joystick.
|
||||
*
|
||||
* This depends on the mapping of the joystick connected to the current port.
|
||||
*
|
||||
* @param hand This parameter is ignored for the Joystick class and is only
|
||||
* here to complete the GenericHID interface.
|
||||
*/
|
||||
double GetY(JoystickHand hand = kRightHand) const override;
|
||||
double GetY() const;
|
||||
|
||||
/**
|
||||
* Get the Z value of the current joystick.
|
||||
|
||||
Reference in New Issue
Block a user