Andriy Makukha / Mbed 2 deprecated football_project_wo_output

Dependencies:   mbed

Fork of football_project by MZJ

Files at this revision

API Documentation at this revision

Comitter:
AntonLS
Date:
Sat Jan 16 03:45:13 2016 +0000
Parent:
54:2878d62714d6
Child:
59:297133497153
Commit message:
Freeform random bug workaround.

Changed in this revision

proto_code.cpp Show annotated file Show diff for this revision Revisions of this file
types.h Show annotated file Show diff for this revision Revisions of this file
--- a/proto_code.cpp	Sat Jan 16 03:16:06 2016 +0000
+++ b/proto_code.cpp	Sat Jan 16 03:45:13 2016 +0000
@@ -992,7 +992,9 @@
 
   uint8_t avail = 0;
   for( uint8_t i=1; i<=NUM_CONES; i++ )
-    if( active_cones[i] && (i != last_cone) )  ac[avail++] = i;
+  {
+      if( ((1==i) ? true : active_cones[i]) && (i != last_cone) )  ac[avail++] = i;
+  }
 
   cone = ((avail != 0) ? ac[rnd() % avail] : 0);
 
--- a/types.h	Sat Jan 16 03:16:06 2016 +0000
+++ b/types.h	Sat Jan 16 03:45:13 2016 +0000
@@ -11,8 +11,8 @@
 #define SL_DEBUG(...)  /* Nothing */
 #endif
 
-//#define MASTER
-#define SLAVE
+#define MASTER
+//#define SLAVE
 
 // these must be here because of magic in the Arduino IDE (otherwise functions cannot retun these types
 #ifdef MASTER