yuhang zhu / Mbed 2 deprecated ADAM_menu

Dependencies:   mbed

Revision:
9:3eaacc1ad758
Parent:
8:f0c3d5911b87
Child:
10:ff8c2470f019
--- a/main.cpp	Sat Jul 13 23:16:29 2013 +0000
+++ b/main.cpp	Sat Jul 13 23:49:04 2013 +0000
@@ -128,9 +128,9 @@
                    else if(ret == PARSE_ROUNDED) //Input is rounded,show the rounded value
                    {    
                         if(state == MODE_CHA1PHA)
-                            pc.printf("%s -%d\n", msg_rounded, cha1_pha*7);
+                            pc.printf("%s %d\n", msg_rounded, cha1_pha*-7);
                         else if(state == MODE_CHA2PHA)
-                            pc.printf("%s -%d\n", msg_rounded, cha2_pha*7);
+                            pc.printf("%s %d\n", msg_rounded, cha2_pha*-7);
                             
                         pc.printf("%s", msg_ret);
                         pc.getc();
@@ -203,6 +203,16 @@
                 pc.getc();
                 state = MODE_IDLE;
                 break;
+                
+            case MODE_HELP:
+                pc.printf("%s", msg_help);
+                pc.printf("%s", msg_ret);
+                pc.getc();
+                state = MODE_IDLE;
+                break;
+                
+            default:
+                state = MODE_IDLE;
         }