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:
58:94b7fd55185e
Parent:
57:ec69651c8c21
Child:
63:6cb0405fc6e6
--- a/StateMachine/StateMachine.hpp	Thu Jun 14 16:10:25 2018 +0000
+++ b/StateMachine/StateMachine.hpp	Fri Jun 15 20:11:39 2018 +0000
@@ -13,6 +13,8 @@
     FIND_NEUTRAL,           // dives to depth at zero pitch, exits when stable
     DIVE,                   // dives to depth at negative pitch, exits when crossing a defined depth
     RISE,                   // rises to surface at positive pitch, exits when near surface
+    POSITION_DIVE,          // NEW POSITION ONLY COMMANDS (inner loop)
+    POSITION_RISE,          // NEW POSITION ONLY COMMANDS (inner loop)
     FLOAT_LEVEL,            // bce position to float, pitch loop active at zero, exits when stable near zero pitch
     FLOAT_BROADCAST,        // bce position to float, batt position forward to hold tail up, exits when actuators done
     EMERGENCY_CLIMB,        // bce position to full rise, batt position to full aft, exits when at surface
@@ -57,7 +59,8 @@
     void keyboard_menu_CHANNEL_READINGS();
     void keyboard_menu_POSITION_READINGS();
     void keyboard_menu_RUDDER_SERVO_settings();
-    void keyboard_menu_COUNTS_STATUS();
+    void keyboard_menu_HEADING_PID_settings();
+    void keyboard_menu_COUNTS_STATUS();             //remove?
     
     void keyboard_menu_BCE_PID_settings();
     void keyboard_menu_BATT_PID_settings();
@@ -100,9 +103,6 @@
     
     float * dataArray();
     
-    //06/06/2018
-    float getFloatUserInput();
-    
 private:
     bool _debug_menu_on;         // default is false to show simple menu, debug allows more tuning and has a lot of keyboard commands
 
@@ -112,7 +112,9 @@
     float _battFloatPosition;    // batt position for "broadcast" state
     
     float _depth_command;       // user keyboard depth
-    float _pitch_command;       // user keyboard depth
+    float _pitch_command;       // user keyboard pitch
+    float _heading_command;     // user keyboard heading
+    
     float _depth_reading;       // depth reading (to get the readings at the same time)
     float _pitch_reading;       // pitch reading (to get the readings at the same time)   
     float _timer_reading;       // pitch reading (to get the readings at the same time)
@@ -169,8 +171,10 @@
     
     float _data_log[9];
     
-    float _BCE_position_command;                    // NEW COMMANDS FOR POSITION CONTROLLER
-    float _BMM_position_command;                    // NEW COMMANDS FOR POSITION CONTROLLER
+    float _BCE_dive_offset;                         // NEW COMMANDS FOR POSITION CONTROLLER
+    float _BMM_dive_offset;
+    
+    float getFloatUserInput();
     
     volatile bool _file_closed;
 };