ft. button press reset

Dependencies:   mbed

Fork of BeaconDemo_RobotCodeNew by James O'Keeffe

Revision:
19:b5788427db67
Parent:
18:3fa5cd53ed45
Child:
20:fe7eb85cf3a1
--- a/main.cpp	Thu Feb 23 09:51:40 2017 +0000
+++ b/main.cpp	Wed Mar 01 15:23:47 2017 +0000
@@ -61,6 +61,7 @@
 
 Ticker main_loop_ticker;
 
+
 ///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()
 {
@@ -76,6 +77,8 @@
     if(use_recharging_program == 1)recharging_program();
     update_display();
     if(recharging_state == 0) {
+        // remove after testing
+        main_program_state = 8;
         switch(main_program_state) {
             case 0: //Case 0 is the initial program: turn to face beacon
                 if(step_cycle == 0) {
@@ -111,6 +114,12 @@
             case 7:
                 tag_game_program();
                 break;
+            case 8:
+                mockFlocking();
+                break;
+            case 254:
+                init();
+                break;
             case 255:
                 stop_program();
                 break;
@@ -252,9 +261,7 @@
         }
     else
     {
-/*        display.clear_display();
-        display.set_position(0,0);
-        display.write_string("NOOO!");*/
+
         }
 }
 /// The main routine: it is recommended to leave this function alone and add user code to the above functions