Commit a501d91e authored by Daniel P. Berrangé's avatar Daniel P. Berrangé 💬
Browse files

Move FSM vars to be after functions they use.

parent cd5ca856
Pipeline #988676 skipped
......@@ -77,13 +77,6 @@ static AccelStepper motor(AccelStepper::DRIVER,
pinOutStep,
pinOutDirection);
// A finite state machine with 3 states - sidereal, highspeed and off
static State stateSidereal = State(state_sidereal_enter, state_sidereal_update, state_sidereal_exit);
static State stateHighspeed = State(state_highspeed_enter, state_highspeed_update, state_highspeed_update);
static State stateOff = State(state_off_enter, state_off_update, state_off_exit);
static FSM barndoor = FSM(stateOff);
// Given time offset from the 100% closed position, figure out
// the total number of steps required to achieve that
long time_to_usteps(long tsecs)
......@@ -346,6 +339,12 @@ void state_off_exit(void)
// nada
}
// A finite state machine with 3 states - sidereal, highspeed and off
static State stateSidereal = State(state_sidereal_enter, state_sidereal_update, state_sidereal_exit);
static State stateHighspeed = State(state_highspeed_enter, state_highspeed_update, state_highspeed_update);
static State stateOff = State(state_off_enter, state_off_update, state_off_exit);
static FSM barndoor = FSM(stateOff);
void loop(void)
{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment