|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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! |
|
#2
|
||||
|
||||
|
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;
}
|
|
#3
|
|||
|
|||
|
Re: Autonomous repeating
Thanks. That fixed the problem. I thought that would cause another problem, but it didn't.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|