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/StartUp.cpp
- Revision:
- 113:c8ea0cd9b20c
- Parent:
- 96:8da1c57296ff
- Child:
- 119:eb212467afb0
diff -r c7afe49752b9 -r c8ea0cd9b20c source/StartUp.cpp
--- a/source/StartUp.cpp Tue May 09 13:58:57 2017 +0000
+++ b/source/StartUp.cpp Tue May 09 15:21:26 2017 +0000
@@ -19,7 +19,7 @@
{
if(get_user() == false && stb2) {
- return 47;
+ return 25;
} else {
stb2 = true;
wait_ms(100);
@@ -50,13 +50,14 @@
if(stb3 == false) {
stb3 = true;
- printf("initial turn...\r\n");
+ // printf("initial turn...\r\n");
turn_for_deg(180);
} else {
printf("turning...\r\n");
- if(1) { // check if turning complete
- printf("turn finished...\r\n");
- return 35;
+ if(turn_for_deg(0) < 0) { // check if turning complete
+ // printf("turn finished...\r\n");
+
+ return 102;
}
}
return 28;
