|
Re: Reading Joystick Values Help
#include "WPILib.h"
#include <Joystick.h>
class RobotDemo : public SimpleRobot
{
RobotDrive MyRobot;
Joystick RightStick;
Joystick LeftStick;
public:
RobotDemo(void):
MyRobot(1, 2),
RightStick(1),
LeftStick(2)
{
GetWatchdog().SetExpiration(100);
}
void Autonomous(void)
{
}
void OperatorControl(void)
{
GetWatchdog().SetEnabled(true);
while (IsOperatorControl())
{
RightStick.GetX(); //this is what i need help with
}
}
};
START_ROBOT_CLASS(RobotDemo);
I know i use this but RightStick.GetX(); where do i put the float to get the value
|