Quote:
Originally Posted by programmr
yes, where to put the variable seems to be our problem. we want to use the variable to keep track of the state of one of our joystick buttons in teleop mode.
int x;
//Now later in the program during teleop routines
if (rightStick->GetRawButton(2)) {
if x = 1 {
x=0; }
else {
x=1; }
x could then be examined to determine the speed of our motors.
|
I think you want to be saying
rather than the single equal sign, which is an assignment operator, not a conditional.