blob: bf1fe8eb9a551e74013d39559b08e87516e8a84d [file] [log] [blame]
Brian Silverman26e4e522015-12-17 01:56:40 -05001/*----------------------------------------------------------------------------*/
2/* Copyright (c) FIRST 2008. All Rights Reserved.
3 */
4/* Open Source Software - may be modified and shared by FRC teams. The code */
5/* must be accompanied by the FIRST BSD license file in $(WIND_BASE)/WPILib. */
6/*----------------------------------------------------------------------------*/
7#pragma once
8
9#include <stdint.h>
10
11/** GenericHID Interface
12 */
13class GenericHID {
14 public:
15 enum JoystickHand { kLeftHand = 0, kRightHand = 1 };
16
17 virtual ~GenericHID() = default;
18
19 virtual float GetX(JoystickHand hand = kRightHand) const = 0;
20 virtual float GetY(JoystickHand hand = kRightHand) const = 0;
21 virtual float GetZ() const = 0;
22 virtual float GetTwist() const = 0;
23 virtual float GetThrottle() const = 0;
24 virtual float GetRawAxis(uint32_t axis) const = 0;
25
26 virtual bool GetTrigger(JoystickHand hand = kRightHand) const = 0;
27 virtual bool GetTop(JoystickHand hand = kRightHand) const = 0;
28 virtual bool GetBumper(JoystickHand hand = kRightHand) const = 0;
29 virtual bool GetRawButton(uint32_t button) const = 0;
30
31 virtual int GetPOV(uint32_t pov = 0) const = 0;
32};