/* RoboRugby Competition framework. Program implements start-up sequence required by rules. Do not delete any lines of this program. Do not change any lines except to define START_BCN_RX Add lines as indicated to define constants, and global variables. All your program code must go in the rrprestart() and rrmain() functions, or in other functions added to this file. When this file is modified, save it under a different name which includes your team number - for example, T08-contest.ic This program needs framework08.ic and beacons.icb - these must be either in the same folder or in the lib\handyboard folder under Interactive C. */ // - includes - you can add more #use commands here #use framework08.ic #use beacons.icb // - defines - you can define more constants here using #define // START_BCN_RX is beacon receiver for startup: 1 internal, 2 external #define START_BCN_RX 2 // - globals - you can define global variables here // global variable startbeacon is already defined, and will be // given a value during the startup sequence void main() //Do not alter this function { rrprestart(); // runs YOUR pre-start function, // to do calibration, choose strategy, or whatever... while(rrstartup(START_BCN_RX)); // start-up sequence // it is run again if the start is aborted // when the startup sequence ends rrstart(start_process(rrmain(), 20)); // starts YOUR main // program as a process, with a 20ms time slice rrshutdown(); // shuts everything down after 60 seconds } // end of main /* Function for pre-start operations, for calibration, etc. If not needed, leave empty - do not delete this function! */ void rrprestart() { } // end of rrprestart /* Main program for competition. Must NOT use reset_system_time() function. Will be shutdown after 60 seconds automatically. To start another process, must use rrstart() function. Global variable startbeacon will be set to 5 or 12 to indicate which beacon was visible at the start. */ void rrmain() { } // end of rrmain // You can add more functions here, if you need them. // checkbeacon() function is already defined in framework08.ic.