SwitchMode

Dependencies:   BEAR_Protocol InverseLeg iSerial mbed

Fork of SwitchMode by Arsapol Manamunchaiyaporn

Revision:
2:d6be1c49d9d5
Parent:
1:183e6088a1fa
Child:
3:b7a8a60085c1
diff -r 183e6088a1fa -r d6be1c49d9d5 main.cpp
--- a/main.cpp	Fri Jan 22 08:03:29 2016 +0000
+++ b/main.cpp	Fri Jan 22 08:04:41 2016 +0000
@@ -12,7 +12,7 @@
 
 void SwMode()
 {
-    int option; // user's entered option will be saved in this variable
+    int option;
     float temp;
     float LH,LK,RH,RK;
     float LLink[2],RLink[2];
@@ -30,8 +30,7 @@
     bool a,b,c,d;
     a = b = c = d = false;
     float temp_LH=0,temp_LK=0,temp_RH=0,temp_RK=0;
-    do { // do-while loop starts here.that display menu again and again until user select to exit program
-        // Displaying Options for the menu
+    do {
         pc.printf("************Don't Forget to Save Data************\n");
         pc.printf("*\t1) Motor Left Hip \t\t\t*\n");
         pc.printf("*\t2) Motor Left Knee \t\t\t*\n");
@@ -579,11 +578,10 @@
         }
 
 
-        else { // if user has entered invalid choice (other than 1,2,3 or 4)
-            // Displaying error message
+        else { // if user has entered invalid choice
             pc.printf("\nInvalid Option entered\n");
         }
-    } while(option != 40); // condition of do-while loop
+    } while(option != 40);
 
 }