Hello, this is Michael from the GS IPT South River Powerhawks Team 1111,
We have gone through the second section of the manual completely and have been successful in uploading and running code (C++) to the cRIO. However, in order to run the code we must stay in teleoperated because when we switch to autonomous mode it runs the autonomous code correctly but does not allow us to switch back to teleoperated.
tl;dr After switching to autonomous we can’t switch back (we select teleoperated but autonomous code continues to run).
Thanks.
the problem: infinite loops
make sure you have a IsAutonomous check instead of an infinite loop. When you switch to Telop/Auto, The DS informs the cRIO that the state has changed, and you need to manually poll for this info
Thanks byteit for the quick reply, but the code we have loaded on the cRIO at this time is the default (C++) code and it does not contain any infinate loops.
Doesn’t the default code for the autonomous mode use a jumper to decide whether it’s in autonomous or not. You could just change that so that when autonomous finishes running (or a set a timer for 15 seconds) it switches to teleop.
Hope this helps.
Are you using the IterativeRobot class? If so, make sure to be using the correct function.