View Single Post
  #12   Spotlight this post!  
Unread 21-04-2013, 21:07
Peragore's Avatar
Peragore Peragore is offline
CEO of Black Magic
AKA: Philip Mulford
FRC #3373 (Team Robohawk)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2011
Location: US
Posts: 50
Peragore is an unknown quantity at this point
Re: Iterative Project

Quote:
Originally Posted by Zer0 View Post
Do I just put the Drive system in the while loop to update it or everything.
Yes.

The standard usage of Simple Robot is something like this:

Code:
public OperatorControl(){
   while (isOperatorControl() and isEnabled()){
    try {
         Thread.sleep(10L);
    } catch (Exception e){
       e.printStackTrace();
    }
   //insert code here, to be called every time through the while loop
   }
}
__________________


Code:
 
while (life){
  frcObsession = true;
  obs.ProgramAndObsess();
}
if (!life) life = true;
Reply With Quote