Rename Joystick default channel constants (#904)

The new naming makes it more clear that the constants are intended to be used
with the channel setters.
This commit is contained in:
Tyler Veness
2018-05-16 19:53:16 -07:00
committed by Peter Johnson
parent 630fc55bde
commit 64b03704f8
4 changed files with 36 additions and 13 deletions

View File

@@ -25,10 +25,21 @@ namespace frc {
*/
class Joystick : public GenericHID {
public:
static constexpr int kDefaultXChannel = 0;
static constexpr int kDefaultYChannel = 1;
static constexpr int kDefaultZChannel = 2;
static constexpr int kDefaultTwistChannel = 2;
static constexpr int kDefaultThrottleChannel = 3;
WPI_DEPRECATED("Use kDefaultXChannel instead.")
static constexpr int kDefaultXAxis = 0;
WPI_DEPRECATED("Use kDefaultYChannel instead.")
static constexpr int kDefaultYAxis = 1;
WPI_DEPRECATED("Use kDefaultZChannel instead.")
static constexpr int kDefaultZAxis = 2;
WPI_DEPRECATED("Use kDefaultTwistChannel instead.")
static constexpr int kDefaultTwistAxis = 2;
WPI_DEPRECATED("Use kDefaultThrottleChannel instead.")
static constexpr int kDefaultThrottleAxis = 3;
enum AxisType { kXAxis, kYAxis, kZAxis, kTwistAxis, kThrottleAxis };