Telliskivi 2 2014

Dependencies:   DoubleCoilGun 4DGL-uLCD-SE ExternalIn HumanInterfaceT14 LedOut MCP3021 MODSERIAL Motor1Pwm1Dir PCA9555 PinDetect QED RgbLedPCA9555 WDT_K64F mbed-src

Fork of Telliskivi2plus by Reiko Randoja

Revision:
3:4ec313b1b314
Parent:
2:a3e6eceed838
Child:
4:c5cf0676baca
--- a/main.cpp	Thu Sep 19 14:30:15 2013 +0000
+++ b/main.cpp	Sun Sep 22 07:27:21 2013 +0000
@@ -445,10 +445,13 @@
     } else if (strncmp(cmd, "fs", 2) == 0) {
         failSafeEnabled = (bool)atoi(strtok(NULL, ":"));
     } else if (strncmp(cmd, "target", 6) == 0) {
-        if (atoi(strtok(NULL, ":")) == 1) {
+        int target = atoi(strtok(NULL, ":"));
+        if (target == 0) {
+            humanInterface.setGoal(HumanInterface::BLUE);
+        } else if (target == 1) {
             humanInterface.setGoal(HumanInterface::YELLOW);
-        } else {
-            humanInterface.setGoal(HumanInterface::BLUE);
+        } else if (target == 2) {
+            humanInterface.setGoal(HumanInterface::UNSET);
         }
     } else if (strncmp(cmd, "error", 5) == 0) {
         humanInterface.setError(atoi(strtok(NULL, ":")));