Files
allwpilib/wpilibc/shared/include/JoystickBase.h
Tyler Veness 140c365e4b Added XboxController class (#140)
Joystick and Gamepad functionality was separated into cleaner interfaces.
2016-11-18 23:05:37 -08:00

31 lines
999 B
C++

/*----------------------------------------------------------------------------*/
/* Copyright (c) FIRST 2016. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
/*----------------------------------------------------------------------------*/
#pragma once
#include "GenericHID.h"
namespace frc {
/**
* Joystick Interface.
*/
class JoystickBase : public GenericHID {
public:
explicit JoystickBase(int port);
virtual ~JoystickBase() = default;
virtual float GetZ(JoystickHand hand = kRightHand) const = 0;
virtual float GetTwist() const = 0;
virtual float GetThrottle() const = 0;
virtual bool GetTrigger(JoystickHand hand = kRightHand) const = 0;
virtual bool GetTop(JoystickHand hand = kRightHand) const = 0;
};
} // namespace frc