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.
Diff: main.cpp
- Revision:
- 6:9eb153e1d472
- Parent:
- 5:1afe17a20a5b
- Child:
- 7:baec885e57db
--- a/main.cpp	Thu Aug 13 15:52:19 2015 +0000
+++ b/main.cpp	Sat Aug 15 11:47:53 2015 +0000
@@ -16,6 +16,7 @@
             i++;
         }
     resetEngines();
+    enableAllButton.mode(PullDown);
     return 0;
 }
 int main()
@@ -25,17 +26,14 @@
         pc.printf("Ready to accept commands.\n\r Netrunner will start moving in 1 second");
         displayPrompt(&pc);
     }
-    inState[0] = 0;
-    inState[1] = 1;
-    inState[2] = 1;
-    inState[3] = 0;
     wait(1);
     while (true) 
     {
+        checkEnableButtonState();
+      //  displayMessage("clicks: %f", &pc, buttonClicks);
         int action = getMenuInput(&pc);
-        float dist = getDistance(0);
-        displayMessage(distMsg, &pc, dist);
-        if(dist <= 10)
+        actualDistance = getDistance(0);
+        if(actualDistance <= 10)
         {
             resetEngines();
         }else