Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: biquadFilter FastPWM MODSERIAL QEI mbed
Diff: main.cpp
- Revision:
- 50:4a7b0a3f64cb
- Parent:
- 44:ca74d11a2dac
- Child:
- 51:78c75cc72d17
diff -r ca74d11a2dac -r 4a7b0a3f64cb main.cpp
--- a/main.cpp Thu Nov 01 15:07:51 2018 +0000
+++ b/main.cpp Thu Nov 01 20:22:46 2018 +0000
@@ -55,10 +55,10 @@
// Define & initialise state machine
const float dt = 0.002f;
-enum states { calibratingMotors, calibratingEMG,
- homing, reading, operating, failing, demoing
- };
-states currentState = calibratingMotors; // start in waiting mode
+enum states { calibratingMotorL, calibratingMotorR, calibratingMotorF,
+ calibratingEMG, homing, reading, operating, failing, demoing };
+
+states currentState = calibratingMotorL; // start in motor L mode
bool changeState = true; // initialise the first state
Ticker stateTimer; // state machine ticker
