Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Problem Switching Between Modes | Powerhawks Team 1111 (http://www.chiefdelphi.com/forums/showthread.php?t=80432)

frenchie4111 17-01-2010 15:51

Problem Switching Between Modes | Powerhawks Team 1111
 
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.

byteit101 17-01-2010 16:00

Re: Problem Switching Between Modes | Powerhawks Team 1111
 
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

frenchie4111 18-01-2010 19:48

Re: Problem Switching Between Modes | Powerhawks Team 1111
 
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.

Diserasta 19-01-2010 06:57

Re: Problem Switching Between Modes | Powerhawks Team 1111
 
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.

basicxman 19-01-2010 08:44

Re: Problem Switching Between Modes | Powerhawks Team 1111
 
Are you using the IterativeRobot class? If so, make sure to be using the correct function.


All times are GMT -5. The time now is 19:38.

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