Treehouse Mbed Team / Mbed 2 deprecated 1U5_proto_X

Dependencies:   mbed

Revision:
1:bc3509459a27
Parent:
0:b3410a1e9843
--- a/src/command.cpp	Thu Jan 27 21:58:14 2022 +0000
+++ b/src/command.cpp	Tue Dec 06 18:47:01 2022 +0000
@@ -34,6 +34,7 @@
 #include "math.h"
 #include "parameters.h"
 #include "all_io.h"
+#include "adc.h"
 //#include "calibrate.h"
 #include "boards.h"
 #include "menu.h"
@@ -554,6 +555,19 @@
          max_boards = commandData;
       }
    }
+   else if (!strcmp(commandString, "ZERO"))
+   // Used to zero out the board amperage measurements
+   {
+      if (running == 1)
+      {
+         sprintf(strbuf, " Parameters may not be updated while running!");
+         sendSerial(strbuf);
+      }
+      else
+      {
+         initADC();
+      }
+   }
    else if (!strcmp(commandString, "BRDS"))
    // BRDS is used to get/set the wr_out value. 
    // The integer value of boardsActive is used to change wr_out via setBoardEnables(boardsActive).