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
Diff: proto_code.cpp
- Revision:
- 55:b3cb69d69ce8
- Parent:
- 54:2878d62714d6
- Child:
- 59:297133497153
diff -r 2878d62714d6 -r b3cb69d69ce8 proto_code.cpp
--- 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);
