#ifndef OI_H
#define OI_H

#include "WPILib.h"
#include "RobotMap.h"
#include <math.h>

class OI
{
private:
	Joystick joystick;

public:
	OI();
	inline float GetXplusY(){
		float val;
		val = FractionOmitted(joystick.GetY() + joystick.GetX());
		if(val > 1.2) val = 1.2;
		if(val < -1.2) val = -1.2;
		return val;
	}
	inline float GetXminusY(){
		float val;
		val = FractionOmitted(joystick.GetY() - joystick.GetX());
		if(val > 1.2) val = 1.2;
		if(val < -1.2) val = -1.2;
		return val;
	}


	inline float GetStickX(){ return FractionOmitted(joystick.GetX()); }
	inline float GetStickY(){ return FractionOmitted(joystick.GetY()); }
	inline float GetStickTwist(){ return FractionOmitted(joystick.GetTwist()); }
	inline float GetStickThrottle(){ return FractionOmitted(joystick.GetThrottle()); }

	inline float FractionOmitted(float original){
		if(fabsf(original) < 0.01 ){
			original = 0;
		}
		return original;
	}
};

#endif

#ifndef OI_H
#define OI_H

#include "WPILib.h"
#include "RobotMap.h"
#include <math.h>

class OI
{
private:
	Joystick joystick;

public:
	OI();
	inline float GetXplusY(){
		float val;
		val = FractionOmitted(joystick.GetY() + joystick.GetX());
		if(val > 1.2) val = 1.2;
		if(val < -1.2) val = -1.2;
		return val;
	}
	inline float GetXminusY(){
		float val;
		val = FractionOmitted(joystick.GetY() - joystick.GetX());
		if(val > 1.2) val = 1.2;
		if(val < -1.2) val = -1.2;
		return val;
	}


	inline float GetStickX(){ return FractionOmitted(joystick.GetX()); }
	inline float GetStickY(){ return FractionOmitted(joystick.GetY()); }
	inline float GetStickTwist(){ return FractionOmitted(joystick.GetTwist()); }
	inline float GetStickThrottle(){ return FractionOmitted(joystick.GetThrottle()); }
	inline float GetStickRightX(){ return FractionOmitted(joystick.GetRawAxis(5)); }
	inline float GetStcikRightY(){ return FractionOmitted(joystick.GetRawAxis(6)); }

	inline float FractionOmitted(float original){
		if(fabsf(original) < 0.01 ){
			original = 0;
		}
		return original;
	}
};

#endif

Create RightStick X and Y value get Function
Create RightStick X and Y value get Function