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

Revision:
21:38c8544db6f4
Parent:
20:8987a9ae2bc7
Child:
22:a10ee088403b
--- a/StateMachine/StateMachine.hpp	Wed Nov 22 14:32:06 2017 +0000
+++ b/StateMachine/StateMachine.hpp	Wed Nov 22 23:04:11 2017 +0000
@@ -52,7 +52,7 @@
     float getDepthCommand();
     float getPitchCommand();
     
-    int findNeutralSubState(int input_state);   //substate returns the state (which is used in overall FSM)
+    int runNeutralStateMachine();   //substate returns the state (which is used in overall FSM)
     
     void setState(int input_state);
     int getState();
@@ -64,8 +64,7 @@
     
     int timeoutRunning();
     
-    //new (quick and dirty version using public variables)
-    void getDiveSequence();
+    void getDiveSequence(); //used in multi-dive sequence with public variables for now
     
 private:
     int _timeout;                // generic timeout for every state, seconds
@@ -90,14 +89,21 @@
     float previousPosition_mm;
     bool isSubStateTimerRunning;
     
-    float _neutral_buoyancy_bce_pos_mm;
-    float _neutral_buoyancy_batt_pos_mm;
-    
-    int _keyboard_state;
-    int _next_state;    //next state is used to prevent states from changing as the FSM executes
+    float _neutral_bce_pos_mm;
+    float _neutral_batt_pos_mm;
     
     int _state_counter;
-    currentSequenceStruct currentStateStruct; //type_of_struct struct_name
+    currentSequenceStruct currentStateStruct;   //type_of_struct struct_name
+    
+    bool _neutral_sub_state_active;             // controls neutral_sub_state
+    
+    float _depth_KP;
+    float _depth_KI;
+    float _depth_KD;
+    
+    float _pitch_KP;
+    float _pitch_KI;
+    float _pitch_KD;
 };
  
 #endif
\ No newline at end of file