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:
- 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;
}
