Quote:
Originally Posted by ekapalka
How about this?
Code:
bool stopp = false;
[...]
if (!stopp)
{
DriveTrain.tankDrive(leftJoystick.getY(), rightJoystick.getY());
}
if (button.get())
{
stopp = true;
}
Does this help?
|
This example will only work if you're using RobotDrive, have its safety feature enabled, and have the timeout set low enough. Otherwise, it'll just stop changing the motors' speeds instead of actually stopping them.