PES 2 - Gruppe 1 / Mbed 2 deprecated Robocode_Random

Dependencies:   mbed

Fork of Robocode by PES 2 - Gruppe 1

Revision:
94:0381e8b1beda
Parent:
93:837a13760026
Child:
95:1c6867536350
--- a/source/Main.cpp	Tue May 02 13:25:56 2017 +0000
+++ b/source/Main.cpp	Tue May 02 15:29:50 2017 +0000
@@ -11,6 +11,7 @@
 int main()
 {
     printf("start...\r\n");
+    disable_servos();
     while (game_timer.read() < 300) {
         wait(0.01f);
         // 5min
@@ -72,7 +73,7 @@
                 break;
             case 16:
                 state = inital_arm_positioning();
-                state = 50;
+                state = 47;
                 break;
             case 17:
                 state = initial_positioning();
@@ -147,6 +148,17 @@
                 wait_ms(500);
                 state = 101;
                 break;
+            case 102:
+                turn_for_deg((360*5));
+                state = 103;
+                break;
+            case 103:
+                float deg = turn_for_deg(0);
+                if(deg < 0) {
+                    printf("remaining deg %f\r\n", deg);
+                    stop_turn();
+                    state = 0;
+                }
         }
     }
 }
\ No newline at end of file