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.
Dependencies: mbed
Fork of Robocode by
Diff: source/Main.cpp
- Revision:
- 98:07a8a858e7cd
- Parent:
- 96:8da1c57296ff
- Child:
- 99:78d87027c85b
--- a/source/Main.cpp Wed May 03 06:49:17 2017 +0000
+++ b/source/Main.cpp Wed May 03 06:59:34 2017 +0000
@@ -73,7 +73,7 @@
break;
case 16:
state = inital_arm_positioning();
- state = 47;
+ state = 104;
break;
case 17:
state = initial_positioning();
@@ -157,8 +157,15 @@
if(deg < 0) {
printf("remaining deg %f\r\n", deg);
stop_turn();
- state = 0;
+ state = 11;
}
+ break;
+ case 104:
+ if(get_user() == false) {
+ printf("Distance read: %f",getDistanceIR(3));
+ }
+ state = 104;
+ break;
}
}
}
\ No newline at end of file
