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

Committer:
tnhnrl
Date:
Thu Jun 14 16:10:25 2018 +0000
Revision:
57:ec69651c8c21
Child:
73:f6f378311c8d
Working version with debug and simple menu

Who changed what in which revision?

UserRevisionLine numberNew contents of line
tnhnrl 57:ec69651c8c21 1 #include "mbed.h"
tnhnrl 57:ec69651c8c21 2 #include "ConfigFile.h"
tnhnrl 57:ec69651c8c21 3
tnhnrl 57:ec69651c8c21 4 #ifndef CONFIGFILEIO_HPP
tnhnrl 57:ec69651c8c21 5 #define CONFIGFILEIO_HPP
tnhnrl 57:ec69651c8c21 6
tnhnrl 57:ec69651c8c21 7 class ConfigFileIO {
tnhnrl 57:ec69651c8c21 8 public:
tnhnrl 57:ec69651c8c21 9 ConfigFileIO();
tnhnrl 57:ec69651c8c21 10
tnhnrl 57:ec69651c8c21 11 void saveBattData(float p_gain, float i_gain, float d_gain);
tnhnrl 57:ec69651c8c21 12 void savePitchData(float p_gain, float i_gain, float d_gain, int batt_zeroOffset);
tnhnrl 57:ec69651c8c21 13
tnhnrl 57:ec69651c8c21 14 void saveBCEData(float p_gain, float i_gain, float d_gain);
tnhnrl 57:ec69651c8c21 15 void saveDepthData(float p_gain, float i_gain, float d_gain, int bce_zeroOffset);
tnhnrl 57:ec69651c8c21 16
tnhnrl 57:ec69651c8c21 17 void saveRudderData(float setMinDeg, float setMaxDeg, float setCenterPWM, float setMinPWM, float setMaxPWM);
tnhnrl 57:ec69651c8c21 18 void saveHeadingData(float heading_p_gain, float heading_i_gain, float heading_d_gain, float heading_offset);
tnhnrl 57:ec69651c8c21 19
tnhnrl 57:ec69651c8c21 20 //write functions to save rudder config later
tnhnrl 57:ec69651c8c21 21
tnhnrl 57:ec69651c8c21 22 //ConfigFunctions
tnhnrl 57:ec69651c8c21 23 int load_BCE_config();
tnhnrl 57:ec69651c8c21 24 int load_BATT_config();
tnhnrl 57:ec69651c8c21 25 int load_DEPTH_config();
tnhnrl 57:ec69651c8c21 26 int load_PITCH_config();
tnhnrl 57:ec69651c8c21 27 int load_HEADING_config(); //heading outer loop of rudder servo
tnhnrl 57:ec69651c8c21 28 int load_RUDDER_config(); //rudder servo
tnhnrl 57:ec69651c8c21 29 int load_script();
tnhnrl 57:ec69651c8c21 30
tnhnrl 57:ec69651c8c21 31 private:
tnhnrl 57:ec69651c8c21 32 float _neutral_batt_pos_mm;
tnhnrl 57:ec69651c8c21 33 float _neutral_bce_pos_mm;
tnhnrl 57:ec69651c8c21 34 };
tnhnrl 57:ec69651c8c21 35 #endif