Quote:
Originally Posted by Greg McKaskle
You don't mention what language you are using. LabVIEW aborts the autonomous when the period ends. It will break out of loops.
I don't believe the other language frameworks do that.
Greg McKaskle
|
Java does not. The "SampleRobot" base class has the following while loop in its autonomous function, which is only called once.
Code:
while(isOperatorControl() && isEnabled()) {
Once teleop starts, this while loop breaks because of the condition of the loop. I HIGHLY recommend using an iterative robot instead of SampleRobot. It handles this nonsense for you.
You can test out if your code breaks by using the "practice" mode in driver station.
As a rule of thumb: while trues are a sin 'round these parts.