ft. button press reset

Dependencies:   mbed

Fork of BeaconDemo_RobotCodeNew by James O'Keeffe

Revision:
16:976a1d0ea897
Parent:
15:d18667eb57f5
Child:
17:f26a5805cde3
--- a/main.cpp	Wed Oct 28 11:42:25 2015 +0000
+++ b/main.cpp	Fri Oct 30 12:15:54 2015 +0000
@@ -10,7 +10,7 @@
 ***********************************************************************/
 
 /// PsiSwarm Beautiful Meme Project Source Code
-/// Version 0.2
+/// Version 0.21
 /// James Hilder, Alan Millard, Homero Elizondo, Jon Timmis
 /// University of York
 
@@ -19,7 +19,7 @@
 
 char * program_name = "B-Meme";
 char * author_name  = "YRL";
-char * version_name = "0.2";
+char * version_name = "0.21";
 
 //  IMPORTANT!!!
 //  Do not call the IR functions at all as they will interfere with the correct operation of this program
@@ -33,7 +33,7 @@
 unsigned short reflected_sensor_data[8]; // The reflected IR values when this robots emitters are on
 unsigned short background_sensor_data[8];// The raw IR values when no robot (or beacon) should have its IR on
 
-char default_normal_program = 6;         // The program to run on turn on (after 'face beacon' program)
+char default_normal_program = 7;         // The program to run on turn on (after 'face beacon' program)
 char use_recharging_program = 1;         // Set to 1 to force robot to run recharging program when battery voltage drops below a threshold
 char user_code_debug = 1;                // Set to 1 to show terminal messages from "out" function [specific to this code]
 char display_debug_inf = 0;              // Set to 1 to show debug info about beacon\robots on display [instead of running program info]
@@ -50,7 +50,7 @@
 char recharging_state = 0;               // Stores the state of the recharging program (0 is not currently running)
 char switch_held = 0;                    // Used for detected when the cursor switch is held to override program choice
 char choose_program_mode = 0;
-char program_count = 7;
+char program_count = 8;
 char program_selection;
 
 float battery_low_threshold = 3.60;      // Threshold at which to interrupt program and start recharging routine: suggest 3.55
@@ -105,6 +105,9 @@
             case 6:
                 clustering_program(0,1);
                 break;
+            case 7:
+                tag_game_program();
+                break;
             case 255:
                 stop_program();
                 break;
@@ -133,7 +136,7 @@
     }
     start_infrared_timers();
     main_loop_ticker.attach_us(&main_loop,BEACON_PERIOD * 10);
-    set_program(5);
+    set_program(0);
     set_leds(0x00,0x00);
     set_center_led(3,0.5);
     display.clear_display();
@@ -221,6 +224,9 @@
         case 6:
             strcpy(ret_name,"CLUSTERING");
             break;
+        case 7:
+            strcpy(ret_name,"TAG GAME");
+            break;
         case 255:
             strcpy(ret_name,"PROGRAM:");
             break;