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: mbed QEI HIDScope biquadFilter MODSERIAL FastPWM
Diff: main.cpp
- Revision:
- 5:77929f5f1f32
- Parent:
- 2:6d026d5655c5
- Child:
- 6:41b02057fc2c
diff -r 2d614f647211 -r 77929f5f1f32 main.cpp --- a/main.cpp Tue Oct 01 08:24:35 2019 +0000 +++ b/main.cpp Tue Oct 01 12:50:38 2019 +0000 @@ -1,17 +1,53 @@ //Global variables and objects -enum States {Idle, Demo}; +enum States {MovementIdle, CalibrationIdle, Demo, Startup, CalibrationPhysical, Move, TiltCup, FailState}; States CurrentState; void Run_Demo(void) { + +} +void Run_MovementIdle(void) +{ + +} + +void Run_CalibrationIdle(void) +{ + +} + +void Run_Startup(void) +{ + } -void Run_Idle(void) +void Run_CalibrationPhysical(void) { + +} +void Run_CalibrationEMG(void) +{ + } +void Run_Move(void) +{ + +} + +void Run_TiltCup(void) +{ + +} + +void Run_FailState(void) +{ + +} + +//State Machine void StateMachine(void) { switch(CurrentState) @@ -19,15 +55,37 @@ case Demo: Run_Demo; break; - case Idle: - Run_Idle(); + case MovementIdle: + Run_MovenmentIdle(); + break; + case CalibrationIdle: + Run_CalibrationIdle; + break; + case Startup; + Run_Startup(); + break; + case CalibrationPhysical: + Run_CalibrationPhysical; + break; + case CalibrationEMG: + Run_CalibrationEMG; + break; + case Move: + Run_Move; + break; + case TiltCup: + Run_TiltCup; + break; + case FailState: + Run_FailState; break; } } +//Main Loop int main() { - CurrentState = Idle; + CurrentState = Startup; while(true) {