|
Re: Using Integer variables
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 would love to change the world but no one will give me the source code"
|