Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of football_project by
Revision 55:b3cb69d69ce8, committed 2016-01-16
- 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
