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/StartUp.cpp
- Revision:
- 131:8ae08f41bb43
- Parent:
- 129:670a954495bf
- Child:
- 133:0046d2224e39
diff -r 670a954495bf -r 8ae08f41bb43 source/StartUp.cpp
--- a/source/StartUp.cpp Mon May 15 13:03:16 2017 +0000
+++ b/source/StartUp.cpp Mon May 15 14:58:27 2017 +0000
@@ -4,10 +4,13 @@
bool stb2 = false;
bool stb3 = false;
+bool printf_state = 0;
+
int idle()
{
-
+ if(printf_state == 0) printf("idle1...\r\n"); printf_state = 1;
if(get_user() == false && stb) {
+ printf_state = 0;
return 15; // button pressed
} else {
stb = true;
@@ -17,8 +20,9 @@
int idle2()
{
-
+ if(printf_state == 0) printf("idle2...\r\n"); printf_state = 1;
if(get_user() == false && stb2) {
+ printf_state = 0;
return 25;
} else {
stb2 = true;
