PES 2 - Gruppe 1 / Mbed 2 deprecated Robocode_Random

Dependencies:   mbed

Fork of Robocode by PES 2 - Gruppe 1

Revision:
98:07a8a858e7cd
Parent:
96:8da1c57296ff
Child:
99:78d87027c85b
diff -r 5afdfe17300f -r 07a8a858e7cd source/Main.cpp
--- 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