Andriy Makukha / Mbed 2 deprecated football_project_wo_output

Dependencies:   mbed

Fork of football_project by MZJ

Revision:
26:40a0c775ff27
Parent:
23:26f27c462976
Child:
28:8e74ddc4f70f
--- a/proto_code.cpp	Tue Dec 15 12:11:05 2015 +0000
+++ b/proto_code.cpp	Wed Dec 30 14:00:28 2015 +0000
@@ -11,7 +11,7 @@
 
 #define DEBUG_BAUD  57600 //57600
 #define MAX_LEN          24  // buffer input commands up to this length
-#define NUM_CONES         2
+#define NUM_CONES         3
 #define STATIONS         20  // max length of a pattern
 #define SEQUENCES         9  // number of patterns to store
 
@@ -49,11 +49,11 @@
 static Mode_t mode = PATTERN;
 static patternState_t state_p = IDLE_P;
 static inputState_t state_i = IDLE_I;
-#define ADDRESS           1
+#define ADDRESS           NODE_ID
 #else
 State_t state = IDLE;
 #define CONTROL_CONE      1
-#define ADDRESS           2
+#define ADDRESS           NODE_ID
 #endif
 
 static Message m1 = { 'm',0,2 };
@@ -1049,7 +1049,7 @@
   
   writeToPhone("Finding cones\r\n");
   //for (i=3; i <=3; ++i)
-  for(i=2;i<NUM_CONES+1;i++)
+  for(i = 2; i < NUM_CONES + 1; ++i)
   {
     active_cones[i] = false;
     m->cone = i;
@@ -1090,19 +1090,18 @@
     }
   }
   
-  /*
-  DEBUG("available cones are: (1");
+  writeToPhone("available cones are: (1");
   
-  for(i=2;i<NUM_CONES+1;i++)
+  for(i = 2; i < NUM_CONES + 1; ++i)
   {
     if(active_cones[i])
     {
-      DEBUG(", ");
-      DEBUG("%d",i);
+      writeToPhone(", %d", i);
     }
   }
-  DEBUG(")\r\n");
-  */
+  
+  writeToPhone(")\r\n");
+  
   #endif
 }