Thread: Logical Auto?
View Single Post
  #7   Spotlight this post!  
Unread 02-08-2016, 08:01 PM
MaikeruKonare's Avatar
MaikeruKonare MaikeruKonare is offline
Programming Division Captain
AKA: Michael Conard
FRC #4237 (Team Lance-a-Bot)
Team Role: Programmer
 
Join Date: Feb 2016
Rookie Year: 2012
Location: Michigan
Posts: 15
MaikeruKonare is an unknown quantity at this point
Re: Logical Auto?

We don't use command based, but all while loops in any of our three main functions (Teleop, Autonomous, or Test) look like this:
Code:
while(IsOperatorControl() && IsEnabled()) {}
Code:
while(IsAutonomous() && IsEnabled()) {}
This prevents any loops going longer than they should, such as when the mode changes or the robot becoming disabled.

Hope that helps.

Last edited by MaikeruKonare : 02-08-2016 at 08:02 PM. Reason: Curly Brackets
Reply With Quote