View Full Version : Autonomous repeating
1024Programming
23-02-2015, 22:28
Our autonomous mode is working essentially how we want it to, but every time it gets to the end of the list of us telling the robot what to do, it goes back to the top and starts over. We've just put a delay at the end to give us time to disable after it finishes, but we're wondering if this is normal and if not how do we fix it?
Thanks!
Can't help you without code, but I'd imagine it would like something like this
boolean autonEnabled = true;
public void autonomousInit(){
autonEnabled = true;
}
public void autonomosPeriodic(){
if(!autonEnabled) return;
//doStuff();
if(autonDone) autonEnabled = false;
}
1024Programming
26-02-2015, 10:06
Thanks. That fixed the problem. I thought that would cause another problem, but it didn't.
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.