mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51: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:
@@ -61,11 +61,11 @@ int Joystick::GetThrottleChannel() const {
|
||||
return m_axes[Axis::kThrottle];
|
||||
}
|
||||
|
||||
double Joystick::GetX(JoystickHand hand) const {
|
||||
double Joystick::GetX() const {
|
||||
return GetRawAxis(m_axes[Axis::kX]);
|
||||
}
|
||||
|
||||
double Joystick::GetY(JoystickHand hand) const {
|
||||
double Joystick::GetY() const {
|
||||
return GetRawAxis(m_axes[Axis::kY]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user