mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-02 02:51:42 +00:00
Added functions for detecting button press and release events (#626)
I also shuffled around the HID interfaces to be more intuitive, deprecated some Joystick and XboxController member functions, and deprecated the JoystickBase and GamepadBase classes. Supersedes #89.
This commit is contained in:
committed by
Peter Johnson
parent
c33fca34e9
commit
21585f70a8
@@ -7,6 +7,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <support/deprecated.h>
|
||||
|
||||
#include "GenericHID.h"
|
||||
|
||||
namespace frc {
|
||||
@@ -14,7 +16,8 @@ namespace frc {
|
||||
/**
|
||||
* Joystick Interface.
|
||||
*/
|
||||
class JoystickBase : public GenericHID {
|
||||
class WPI_DEPRECATED("Inherit directly from GenericHID instead.") JoystickBase
|
||||
: public GenericHID {
|
||||
public:
|
||||
explicit JoystickBase(int port);
|
||||
virtual ~JoystickBase() = default;
|
||||
@@ -22,9 +25,6 @@ class JoystickBase : public GenericHID {
|
||||
virtual double GetZ(JoystickHand hand = kRightHand) const = 0;
|
||||
virtual double GetTwist() const = 0;
|
||||
virtual double GetThrottle() const = 0;
|
||||
|
||||
virtual bool GetTrigger(JoystickHand hand = kRightHand) const = 0;
|
||||
virtual bool GetTop(JoystickHand hand = kRightHand) const = 0;
|
||||
};
|
||||
|
||||
} // namespace frc
|
||||
|
||||
Reference in New Issue
Block a user