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:
- 127:6bde4483ce7b
- Parent:
- 125:d0b2057272d0
- Child:
- 130:0d6c072b23ca
- Child:
- 131:8ae08f41bb43
diff -r d05c45917280 -r 6bde4483ce7b source/Main.cpp
--- a/source/Main.cpp Sun May 14 13:40:17 2017 +0000
+++ b/source/Main.cpp Sun May 14 14:40:12 2017 +0000
@@ -2,6 +2,7 @@
int state = 10;
+int old_state = 0;
bool positioning_state = 0;
bool mapping_state = 0;
@@ -40,8 +41,10 @@
//State and Transition Table can be found in the State_Machine.xlsx
//*******************************************************************************
-
- //printf("state: %d\r\n",state);
+ if(state != old_state){
+ printf("state: %d\r\n",state);
+ old_state = state;
+ }
switch (state) {
case 0:
state = emergency_shutdown();
@@ -98,7 +101,6 @@
break;
case 36:
state = pathfinding();
- state = 0;
break;
case 37:
state = switch_target_red();
