WPILibC++  2019.3.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
JoystickBase.h
1 /*----------------------------------------------------------------------------*/
2 /* Copyright (c) 2016-2018 FIRST. All Rights Reserved. */
3 /* Open Source Software - may be modified and shared by FRC teams. The code */
4 /* must be accompanied by the FIRST BSD license file in the root directory of */
5 /* the project. */
6 /*----------------------------------------------------------------------------*/
7 
8 #pragma once
9 
10 #include <wpi/deprecated.h>
11 
12 #include "frc/GenericHID.h"
13 
14 namespace frc {
15 
19 class JoystickBase : public GenericHID {
20  public:
21  WPI_DEPRECATED("Inherit directly from GenericHID instead.")
22  explicit JoystickBase(int port);
23  virtual ~JoystickBase() = default;
24 
25  JoystickBase(JoystickBase&&) = default;
26  JoystickBase& operator=(JoystickBase&&) = default;
27 
28  virtual double GetZ(JoystickHand hand = kRightHand) const = 0;
29  virtual double GetTwist() const = 0;
30  virtual double GetThrottle() const = 0;
31 };
32 
33 } // namespace frc
WPILib FRC namespace.
Definition: SPIAccelerometerSim.h:18
Joystick Interface.
Definition: JoystickBase.h:19
GenericHID Interface.
Definition: GenericHID.h:23