View Single Post
  #3   Spotlight this post!  
Unread 17-01-2009, 21:33
FearlessLeader FearlessLeader is offline
Registered User
AKA: James Wittel
FRC #2753 (Team Overdrive)
Team Role: Programmer
 
Join Date: Dec 2008
Rookie Year: 2003
Location: NJ
Posts: 6
FearlessLeader is an unknown quantity at this point
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
__________________
Team Overdrive #2753 - FRC 2008/2009

FTC 2007/2008 world champions!
New Brunswick Eruption - Future Glory Award
Attending NJ Regional
Attending NYC Regional

www.teen-technology.org
www.JPEX-studios.com
www.team-overdrive.com
Past: FTC #74, FVC #3179
Reply With Quote