Thread: Stop Driving
View Single Post
  #10   Spotlight this post!  
Unread 06-04-2013, 13:51
ekapalka's Avatar
ekapalka ekapalka is offline
Registered User
FRC #3216
 
Join Date: Dec 2012
Location: Bermuda
Posts: 277
ekapalka has a spectacular aura aboutekapalka has a spectacular aura about
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);
}
Sorry. I've actually been programming in C++. This year we had a function using something like this that would take control from the driver and autonomously take control using the sensors. It was flawless (we programmed it during the final three rounds of the competition :P )
Reply With Quote