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
Revision 3:4ec313b1b314, committed 2013-09-22
- Comitter:
- Reiko
- Date:
- Sun Sep 22 07:27:21 2013 +0000
- Parent:
- 2:a3e6eceed838
- Child:
- 4:c5cf0676baca
- Commit message:
- Added target:2 command for unsetting goal LEDs
Changed in this revision
Motor2.lib | Show annotated file Show diff for this revision Revisions of this file |
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/Motor2.lib Thu Sep 19 14:30:15 2013 +0000 +++ b/Motor2.lib Sun Sep 22 07:27:21 2013 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/Reiko/code/Motor2/#63a67086a1b5 +http://mbed.org/users/Reiko/code/Motor2/#bec5a728405f
--- 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, ":")));