How do Program chooser and Single program mode work?
Page 1 of 1

Author:  MHTS [ Wed Nov 28, 2012 8:20 pm ]
Post subject:  How do Program chooser and Single program mode work?

Does anyone know details about this? In previous years, we always have to write two programs: one for autonomous and one for teleop and must use the Competition Joystick dialog to "select" the teleop program name. This will generate a ftcconfig.txt file on the NXT brick that contains the teleop program name so that after autonomous period is done, the FCS can instruct the NXT to load the correct teleop program and run it. I understand that this year, the dual program mode will still work but in addition, we can also code both autonomous and teleop into a single program. FIRST has provided a program chooser. I have looked at the source code of this tool and it is basically deleting the ftcconfig.txt file if the user chooses single program mode. Before we spend time to do the work to combine autonomous and teleop into one single program, I would like to know how a single program works in the FCS environment. Who runs the program chooser and when do we run it? How does the FCS know if the robot is running single program mode or dual program mode or does it even care? At the beginning of the competition, I assume we will start our single mode program. At the end of autonomous, what will happen? Will FCS or the NXT kill the program? Will somebody be smart enough to tell we are running single program mode (e.g. for the fact that there is no ftcconfig.txt) so it won't kill our program and let it continue to teleop mode? We understand that our single mode program will be responsible for monitoring the running mode so that it will transition from autonomous to teleop. I have looked at the dual program mode template and have implemented our own main loop that understands the mode transitions. But I am nervous about if this will work correctly unless I fully understand how the FCS deals with single program mode robots versus dual program mode robots.

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group