Console Serial IO con display OLED e seriale asincrona

Dependencies:   mbed BufferedSerial AserialIOFuncLib SSD1306 TerminalPlusV2

Fork of SerialIO by Max Scordamaglia

Console Serial IO con display OLED e seriale asincrona

Revision:
40:48422add4537
Parent:
39:0d7165083e7a
Child:
41:fb612a3936fb
--- a/Functions.h	Sun Dec 27 23:15:53 2015 +0000
+++ b/Functions.h	Sun Jan 03 14:32:39 2016 +0000
@@ -115,7 +115,7 @@
 
     //in arrivo e carica funzioni da Arduino
     if (func=="f") {
-        errp=funcOut(func, funcnum,param, string(stringa));
+        errp=funcOut(func, string(stringa));
     }
 
     //led for test
@@ -125,7 +125,7 @@
 
     //in arrivo e carica menu da Arduino
     else if (func=="m") {
-        errp=menuOut(func, funcnum,param, string(stringa));
+        errp=menuOut(func,string(stringa));
     }
 
     //Random Activate DA FARE!!!!!!!!!
@@ -151,8 +151,7 @@
         ardser.printf("Bad command\n\r");
         printDisp(dispType,"** Bad command ** \n\r");
     }
-
-    term.readypos();
+   if (errp==0) term.readypos(); //riposiziono solo solo se a 0
 }
 
 
@@ -187,10 +186,14 @@
     else if (strIn.substr(0,3)=="stop") {
         errp=StopfuncIn();
     }
+    //Valori funzione in input
+    else if (func=="v") {
+       errp=valueIn(stringa);
+    }
 
 //writeLogInput( strIn{
     term.formatPrintf(fnzAdd.string2char(">"+fnzAdd.subEOS(string(stringa))+"<"),18,21,99,1);
-    term.readypos();
+    if (errp==0) term.readypos();
 }
 
 void preloadValue()
@@ -205,7 +208,7 @@
         menu_main[i]="";
         menu_funcChoice[i]="";
     }
-    for (int i = 0; i < 100; i++) {
+    for (int i = 0; i < 50; i++) {
         menu_function[i]="";
     }
     menu_main[0]="Z.Z"; //invero e' sbagliato. controllare cosa usa di stop