2015-01-11 16:02:49 -05:00
|
|
|
#ifndef OI_H
|
|
|
|
#define OI_H
|
|
|
|
|
|
|
|
#include "WPILib.h"
|
2015-02-12 21:18:48 -05:00
|
|
|
#include "Commands/Command.h"
|
2015-01-11 16:02:49 -05:00
|
|
|
|
2015-03-01 17:19:00 -05:00
|
|
|
/**
|
|
|
|
* @brief Controls the robot with joysticks
|
|
|
|
*/
|
2015-07-31 12:52:15 -04:00
|
|
|
class OI {
|
|
|
|
private:
|
|
|
|
Joystick *leftStick, //<! Left joystick
|
|
|
|
*rightStick; //<! Right joystick
|
|
|
|
public:
|
|
|
|
/**
|
|
|
|
* @brief Constructs OI
|
|
|
|
*/
|
|
|
|
OI();
|
|
|
|
/**
|
|
|
|
* Raise command
|
|
|
|
*/
|
|
|
|
Command *raise,
|
|
|
|
/**
|
|
|
|
* @brief Lower command
|
|
|
|
*/
|
|
|
|
*lower,
|
|
|
|
/**
|
|
|
|
* @brief BinLower command
|
|
|
|
*/
|
|
|
|
*binLower,
|
|
|
|
/**
|
|
|
|
* @brief BinRaise command
|
|
|
|
*/
|
|
|
|
*binRaise;
|
|
|
|
/**
|
|
|
|
* @brief ElevatorCycle commandgroup
|
|
|
|
*/
|
|
|
|
CommandGroup *cycle;
|
|
|
|
/**
|
|
|
|
* @brief Returns the right joystick
|
|
|
|
*
|
|
|
|
* @return The right joystick
|
|
|
|
*/
|
|
|
|
Joystick* GetRightStick();
|
|
|
|
/**
|
|
|
|
* @brief Returns the left joystick
|
|
|
|
*
|
|
|
|
* @return The left joystick
|
|
|
|
*/
|
|
|
|
Joystick* GetLeftStick();
|
|
|
|
/**
|
|
|
|
* @brief Returns the left joystick throttle
|
|
|
|
*
|
|
|
|
* @return The left joystick throttle
|
|
|
|
*/
|
|
|
|
double GetLeftThrottle();
|
|
|
|
/**
|
|
|
|
* @brief Returns the right joystick throttle
|
|
|
|
*
|
|
|
|
* @return The right joystick throttle
|
|
|
|
*/
|
|
|
|
double GetRightThrottle();
|
2015-01-11 16:02:49 -05:00
|
|
|
};
|
|
|
|
#endif
|
2015-02-08 12:26:15 -05:00
|
|
|
// vim: ts=2:sw=2:et
|