The subsystem design/basis for the final project

Dependencies:   mbed-rtos mbed-src pixylib

Revision:
18:501f1007a572
Parent:
17:47e107f9587b
Child:
19:05b8123905fb
--- a/main.cpp	Sun Apr 03 19:00:21 2016 +0000
+++ b/main.cpp	Thu Apr 07 13:19:29 2016 +0000
@@ -34,19 +34,14 @@
         PrintMenu(&pc);
         mode = pc.getc();
         pc.printf("\r\n\r\n");
-        switch (mode) {
-            case AUTO_TRACK: 
-                AutoTrack();
-                break;
-            case MANUAL_CONTROL: 
-                ManualControl();
-                break;
-            case SYSTEM_TUNING: 
-                Tunning();
-                break;
-            default:
-                pc.printf("Error: Invalid Selection \r\n\r\n");
-                break;
+        if ((mode == '0')||(mode == 'a')) {
+            AutoTrack();
+        } else if ((mode == '1')||(mode == 'm')) {
+            ManualControl();
+        } else if (mode == '2') {
+            Tunning();
+        } else {
+            pc.printf("Error: Invalid Selection \r\n\r\n");
         }
         wait_ms(2000);
     }