Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   Autonomous repeating (http://www.chiefdelphi.com/forums/showthread.php?t=135097)

1024Programming 02-23-2015 10:28 PM

Autonomous repeating
 
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!

Arhowk 02-24-2015 06:33 AM

Re: Autonomous repeating
 
Can't help you without code, but I'd imagine it would like something like this

Code:

boolean autonEnabled = true;
public void autonomousInit(){
    autonEnabled = true;
}
public void autonomosPeriodic(){
    if(!autonEnabled) return;
    //doStuff();
    if(autonDone) autonEnabled = false;
}


1024Programming 02-26-2015 10:06 AM

Re: Autonomous repeating
 
Thanks. That fixed the problem. I thought that would cause another problem, but it didn't.


All times are GMT -5. The time now is 09:00 AM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi