Quote:
Originally Posted by mikelowry
Code:
while (IsOperatorControl())
{
GetWatchdog().Feed();
myRobot.TankDrive(leftStick, rightStick);
Wait(0.005);
}
Is the while(IsOperatorControl()) line really necessary? because all of the code inside it is inside the teleop section of the code anyway.
And what is the difference between putting the RobotDrive and the Joysticks inside the class and moving the constructors as opposed to how i had it?
|
Yes, but remove the while(1) around that, because if you dont, it will do it once and exit. the function is called and not called again untill it switches state, so if it stays there, then your program stays there