Go to Post FIRST rocks, thats for sure. - Dan Richardson [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Spotlight this post!  
Unread 08-02-2016, 20:09
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 : 08-02-2016 at 20:12.
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 13:20.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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