View Single Post
  #6   Spotlight this post!  
Unread 02-08-2016, 08:09 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: Running networking code while robot is disabled

Sorry, I should have been specific. The periodic one loops. In SampleRobot it does not.

If you want to loop in Disabled() you could try:

Code:
Robot::Disabled()
{
  while(!IsEnabled()) //or while(IsEnabled() == false)
  {
     printf("Disabled!\n");
  }
}
Regardless, I would only do this at home and not at competitions.

Edit: When I said that it loops earlier I was thinking of when print statements from OperatorControl continue printing if you're missing the "IsOperatorControl()" function in your while condition.

Last edited by MaikeruKonare : 02-08-2016 at 08:12 PM.
Reply With Quote