PES 2 - Gruppe 1 / Mbed 2 deprecated Robocode_Random

Dependencies:   mbed

Fork of Robocode by PES 2 - Gruppe 1

Revision:
37:20e0e2487efc
Parent:
35:554c922f2bb5
Parent:
36:b654afdf886e
Child:
38:3526c36e4c73
--- a/source/Main.cpp	Wed Mar 29 14:15:49 2017 +0000
+++ b/source/Main.cpp	Tue Apr 04 11:58:34 2017 +0000
@@ -3,7 +3,7 @@
 #include "Robot.h"
 
 
-int state = 10;
+int state = 200;
 bool positioning_state = 0;
 bool mapping_state = 0;
 
@@ -15,6 +15,7 @@
 
     // while (timer() < 300) {
     while (1) {
+        wait(0.01f);
         // 5min
         //*******************************************************************************
         //Non_state machine driven function
@@ -162,7 +163,7 @@
                           case 102:
                               state = move_to_brick;
 
-            */          case 200:
+            */  case 200:
                 state = IMU();
                 break;
             default:
@@ -175,7 +176,7 @@
 
 int IMU()
 {
-    printf("%f", read_heading());
+    printf("%f\r\n", read_heading());
     return 200;
 }