most functionality to splashdwon, find neutral and start mission. short timeouts still in code for testing, will adjust to go directly to sit_idle after splashdown
Dependencies: mbed MODSERIAL FATFileSystem
Diff: StateMachine/StateMachine.hpp
- Revision:
- 24:c7d9b5bf3829
- Parent:
- 23:434f04ef1fad
- Child:
- 27:0a5b90cd65d6
--- a/StateMachine/StateMachine.hpp Tue Nov 28 18:00:09 2017 +0000 +++ b/StateMachine/StateMachine.hpp Wed Nov 29 15:19:14 2017 +0000 @@ -82,19 +82,16 @@ int _state; // Fine State Machine (FSM) state int _sub_state; // substate on find_neutral function int _previous_sub_state; // previous substate so that what goes into the sub-state is not being changed as it is processed - float _neutral_sink_timer; // keep time for sink incremnets - float _neutral_rise_timer; // keep time for rise increment - float _level_timer; // keep time for finding level increments + float _neutral_timer; // keep time for rise/sink/level timer incremnets bool isTimeoutRunning; - float previousPosition_mm; bool isSubStateTimerRunning; float _neutral_bce_pos_mm; float _neutral_batt_pos_mm; - int _state_counter; + int _multi_dive_counter; currentSequenceStruct currentStateStruct; //type_of_struct struct_name bool _neutral_sub_state_active; // controls neutral_sub_state @@ -107,8 +104,10 @@ float _pitch_KI; float _pitch_KD; - int _state_array[1024]; //print out the states - int _state_array_counter; + int _state_array[1024]; //used to print out the states + int _state_array_counter; //variables used to record NEUTRAL sub-FSM states + int _substate; + int _previous_substate; }; #endif \ No newline at end of file