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