ft. button press reset

Dependencies:   mbed

Fork of BeaconDemo_RobotCodeNew by James O'Keeffe

Revision:
7:ef9ab01b9e26
Parent:
6:ff3c66f7372b
Child:
9:085e090e1ec1
--- a/beacon.cpp	Thu Oct 22 00:46:14 2015 +0000
+++ b/beacon.cpp	Thu Oct 22 13:28:17 2015 +0000
@@ -203,7 +203,7 @@
         }
     } else {
         beacon_found = 0;
-        if(beacon_detected_count > 7) out("Beacon not found: too many high samples [%d]\n",beacon_detected_count);
+        if(beacon_detected_count > 6) out("Beacon not found: too many high samples [%d]\n",beacon_detected_count);
         else out("Beacon not found: too few high samples [%d]\n",beacon_detected_count);
     }
     wait(1);
@@ -297,6 +297,8 @@
             }else{
                 if(sum > low_threshold){
                     robots_found[test_robot] = 1;
+                    //Debug--
+                    //out("Robot %d: [%d][%d][%d][%d][%d][%d][%d][%d]\n",test_robot,ir_sensor_data[i][0],ir_sensor_data[i][1],ir_sensor_data[i][2],ir_sensor_data[i][3],ir_sensor_data[i][4],ir_sensor_data[i][5],ir_sensor_data[i][6],ir_sensor_data[i][7]);
                     robots_heading[test_robot] = get_bearing_from_ir_array (ir_sensor_data[i]);
                     robots_distance[test_robot] = highest;
                 }else robots_found[test_robot] = 0;