YRL Maze lab made more script-y

Dependencies:   PsiSwarmLab-ScriptingBased mbed

Fork of UKESF_Lab by UKESF Headstart Summer School

Revision:
18:5921c1853e8a
Parent:
17:da524989b637
Child:
19:77f7089dca87
--- a/main.cpp	Thu Jan 07 17:58:07 2016 +0000
+++ b/main.cpp	Fri Jan 08 19:10:52 2016 +0000
@@ -52,19 +52,12 @@
 char choose_program_mode = 0;
 char program_count = 8;
 char program_selection;
-int flocking_heading = 0;
+int flocking_headings[8];
 
 float battery_low_threshold = 3.60;      // Threshold at which to interrupt program and start recharging routine: suggest 3.55
 float battery_high_threshold = 3.95;     // Threshold at which to end battery recharging routine and resume normal program: suggest 4.0
 
 Ticker main_loop_ticker;
-Ticker flocking_ticker;
-
-void flocking_heading_update()
-{
-    flocking_heading += 5;
-    flocking_heading %= 360;       
-}
 
 ///This is the main loop for the Beautiful Meme code.  The code block is run once every 250mS* [with 4Hz beacon] once all the IR samples have been collected.
 void main_loop()
@@ -140,7 +133,6 @@
     out("------------------------------------------------------\n");
     out("Beautiful Meme Project Demo Code                      \n");
     out("------------------------------------------------------\n");
-    while(1);
     locate_beacon();
     while(beacon_found == 0) {
         wait(0.5);
@@ -148,7 +140,6 @@
     }
     start_infrared_timers();
     main_loop_ticker.attach_us(&main_loop,BEACON_PERIOD * 10);
-    flocking_ticker.attach(&flocking_heading_update, 1);
     set_program(0);
     set_leds(0x00,0x00);
     set_center_led(3,0.5);