PES 2 - Gruppe 1 / Mbed 2 deprecated Robocode_Random

Dependencies:   mbed

Fork of Robocode by PES 2 - Gruppe 1

Revision:
36:b654afdf886e
Parent:
34:40d8d29b44b8
Child:
37:20e0e2487efc
diff -r 40d8d29b44b8 -r b654afdf886e source/Main.cpp
--- a/source/Main.cpp	Wed Mar 29 12:10:32 2017 +0000
+++ b/source/Main.cpp	Fri Mar 31 08:57:16 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;
 }