Quote:
Originally Posted by CRLS97
Ether, are you implying that if my global variable returns false, then it waits 20ms BEFORE doing whatever else is in that case statement?
|
No, it releases the processor for 20ms before looping back* to the top of the while loop and checking the "run_me" boolean again. There is no case statement in the pseudo-code I posted so I'm not sure what you were referring to.
Quote:
|
If so, wouldn't that cause the error since the Teleop code is taking >20ms to complete one cycle?
|
No. The while loop goes into the periodic tasks vi. The while loop runs in parallel with TeleOp.
Read the posts linked below. Seriously, read and study them. You will be glad you did:
http://www.chiefdelphi.com/forums/sh...96&postcount=3
http://www.chiefdelphi.com/forums/sh...21&postcount=6
http://www.chiefdelphi.com/forums/sh...43&postcount=4
* the "continue" statement in C means "go back to the top of the loop"