Treehouse Mbed Team / Mbed 2 deprecated APS_DCM1SL

Dependencies:   mbed

Revision:
30:d8721a46ee03
Parent:
26:55e8e1a9cc84
Child:
33:6c7364ea360f
--- a/src/menu.cpp	Tue Mar 05 19:21:32 2019 +0000
+++ b/src/menu.cpp	Wed Mar 06 22:32:31 2019 +0000
@@ -70,55 +70,44 @@
     }else{
         sprintf(strbuf_mode, "Boost Mode | ");
     }
-    //sendSerial(strbuf);
     
     if(running){
         sprintf(strbuf_running, "Running     | ");
     }else{
         sprintf(strbuf_running, "NOT Running | ");
     }
-    //sendSerial(strbuf);
     
     if(statVals.V48_IS_HI){
         sprintf(strbuf_v48, "V48 HIGH | ");
     }else if(statVals.V48_IS_LO){
         sprintf(strbuf_v48, "V48 LOW  | ");
     }else{
-    //    sprintf(strbuf, "V48 OK   | ");
         sprintf(strbuf_v48, "");
         sprintf(strbuf_blank, "           ");
     }
-    //sendSerial(strbuf);
     
     if(statVals.V24_IS_HI){
         sprintf(strbuf_v24, "V24 HIGH | ");
     }else if(statVals.V24_IS_LO){
         sprintf(strbuf_v24, "V24 LOW  | ");
     }else{
-    //    sprintf(strbuf, "V24 OK   | ");
         sprintf(strbuf_v24, "");
         sprintf(strbuf_blank, strcat(strbuf_blank, "           "));
     }
-    //sendSerial(strbuf);
     
     if(statVals.V12_IS_HI){
         sprintf(strbuf_v12, "V12 HIGH ");
     }else if(statVals.V24_IS_LO){
         sprintf(strbuf_v12, "V12 LOW  ");
     }else{
-    //    sprintf(strbuf, "V12 OK   | ");
         sprintf(strbuf_v12, "");
         sprintf(strbuf_blank, strcat(strbuf_blank, "           "));
     }
-    //sendSerial(strbuf);
     
-    //move cursor to STATUS_ROW and write status info
-    //char row = STATUS_ROW + '0';
     sprintf( strbuf, "%c[9;0f", 27); // ESC=27, Move cursor position = [line;columnf
     sendSerial(strbuf);
     
     sprintf(strbuf, "Status: %s%s%s%s%s%s\r\n\r\n", strbuf_mode, strbuf_running, strbuf_v48, strbuf_v24, strbuf_v12, strbuf_blank);
-    //sprintf(strbuf, "Status: %s%s%s%s%s%d  \r\n\r\n", strbuf_mode, strbuf_running, strbuf_v48, strbuf_v24, strbuf_v12, row_print);
     sendSerial(strbuf);
     
 }
@@ -127,8 +116,6 @@
  refreshData - Refresh voltage and current readings to the terminal
 *******************************************************************************/
 void refreshData(struct adcValues adcVals){
-    //loopTime = masterTimer.read_ms() - oldTime;
-    //oldTime = masterTimer.read_ms();
     
     struct displayValues dvals = calcDisplayValues(adcVals);
     
@@ -136,16 +123,12 @@
     double pwr_in=dvals.v48f*(dvals.i48f);
     double pwr_eff=100*pwr_out/pwr_in;
     
-    //move cursor to DATA_ROW and write data
-    //row = DATA_ROW + '0';
+   
     sprintf( strbuf, "%c[10;0f", 27); // ESC=27, Move cursor position = [line;columnf
     sendSerial(strbuf);
     
     sprintf(strbuf, "V48=%2.1f, I48=%3.1f | V24=%2.1f, I24=%3.1f | V12=%2.1f, I12=%3.2f    \r\n", dvals.v48f, dvals.i48f, dvals.v24f, dvals.i24f, dvals.v12f, dvals.i12f);
-    //sprintf(strbuf, "V48=%2.1f, I48=%2.2f | V24=%2.1f, I24=%2.2f | V12=%2.1f, I12=%2.2f || loop=%d    \r\n", v48f, i48f, v24f, i24f, v12f, i12f, loopTime);
     sendSerial(strbuf);
-    //sprintf(strbuf, "adcVals.i12 = %d     \r\n", adcVals.i12);
-    //sendSerial(strbuf);
     sprintf(strbuf, "Power Out = %4.1f W, Power In = %4.1f W     \r\n", pwr_out, pwr_in);
     sendSerial(strbuf);
     sprintf( strbuf, "%c[34m", 27 ); // ESC=27, Blue Text
@@ -272,7 +255,6 @@
         // adds a carrot so you know you are talking in terminal
         sprintf(strbuf,"\n\r%s>",strMenu);
         sendSerial(strbuf);
-        // sendSerial("\n\r>");
      }
 }
 
@@ -287,12 +269,4 @@
     sprintf(strbuf," / ___ / /_/ / / / / /_/ /_/ /  / ____/ /_/ / |/ |/ /  __/ /      ___/ / /_/ (__  ) /_/  __/ / / / / (__  ) \r\n");sendSerial(strbuf);
     sprintf(strbuf,"/_/  |_\\__, /_/_/_/\\__/\\__, /  /_/    \\____/|__/|__/\\___/_/      /____/\\__, /____/\\__/\\___/_/ /_/ /_/____/  \r\n");sendSerial(strbuf);
     sprintf(strbuf,"      /____/          /____/                                          /____/                                \r\n");sendSerial(strbuf);
-}
-/*
-    sprintf(strbuf,"    ___         _ ___ __           ____                             _____            __                     \r\n");
-    sprintf(strbuf,"   /   | ____ _(_) (_) /___  __   / __ \____ _      _____  _____   / ___/__  _______/ /____  ____ ___  _____\r\n");
-    sprintf(strbuf,"  / /| |/ __ `/ / / / __/ / / /  / /_/ / __ \ | /| / / _ \/ ___/   \__ \/ / / / ___/ __/ _ \/ __ `__ \/ ___/\r\n");
-    sprintf(strbuf," / ___ / /_/ / / / / /_/ /_/ /  / ____/ /_/ / |/ |/ /  __/ /      ___/ / /_/ (__  ) /_/  __/ / / / / (__  ) \r\n");
-    sprintf(strbuf,"/_/  |_\__, /_/_/_/\__/\__, /  /_/    \____/|__/|__/\___/_/      /____/\__, /____/\__/\___/_/ /_/ /_/____/  \r\n");
-    sprintf(strbuf,"      /____/          /____/                                          /____/                                \r\n");
-*/
\ No newline at end of file
+}
\ No newline at end of file