WPILibC++  unspecified
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Pages
GenericHID.h
1 /*----------------------------------------------------------------------------*/
2 /* Copyright (c) FIRST 2008-2016. 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 <stdint.h>
11 
14 class GenericHID {
15  public:
16  enum JoystickHand { kLeftHand = 0, kRightHand = 1 };
17 
18  virtual ~GenericHID() = default;
19 
20  virtual float GetX(JoystickHand hand = kRightHand) const = 0;
21  virtual float GetY(JoystickHand hand = kRightHand) const = 0;
22  virtual float GetZ() const = 0;
23  virtual float GetTwist() const = 0;
24  virtual float GetThrottle() const = 0;
25  virtual float GetRawAxis(uint32_t axis) const = 0;
26 
27  virtual bool GetTrigger(JoystickHand hand = kRightHand) const = 0;
28  virtual bool GetTop(JoystickHand hand = kRightHand) const = 0;
29  virtual bool GetBumper(JoystickHand hand = kRightHand) const = 0;
30  virtual bool GetRawButton(uint32_t button) const = 0;
31 
32  virtual int GetPOV(uint32_t pov = 0) const = 0;
33 };
GenericHID Interface.
Definition: GenericHID.h:14