|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Re: Stop Driving
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.
|
|
#2
|
||||
|
||||
|
Re: Stop Driving
Is the safety feature enabled by default?
|
|
#3
|
||||
|
||||
|
Re: Stop Driving
?
Code:
bool stopp = false;
[...]
if (!stopp)
{
DriveTrain.tankDrive(leftJoystick.getY(), rightJoystick.getY());
}
if (button.get())
{
stopp = true;
DriveTrain.tankDrive(0.0, 0.0);
}
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|