Flying Sea Glider / Mbed 2 deprecated 2019_19feb19_jcw_noSD

Dependencies:   mbed MODSERIAL FATFileSystem

Committer:
joel_ssc
Date:
Fri Feb 15 16:00:17 2019 +0000
Revision:
82:0981b9ada820
Parent:
76:c802e1da4179
intermediate stage of file leg system

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"
joel_ssc 82:0981b9ada820 3 #include <string>
tnhnrl 57:ec69651c8c21 4
tnhnrl 57:ec69651c8c21 5 #ifndef CONFIGFILEIO_HPP
tnhnrl 57:ec69651c8c21 6 #define CONFIGFILEIO_HPP
joel_ssc 82:0981b9ada820 7 struct logFileNames {
joel_ssc 82:0981b9ada820 8 string diagFileName;
joel_ssc 82:0981b9ada820 9 string logFileName;
joel_ssc 82:0981b9ada820 10 int logversion;
joel_ssc 82:0981b9ada820 11 int diagversion;
joel_ssc 82:0981b9ada820 12 };
tnhnrl 57:ec69651c8c21 13
joel_ssc 82:0981b9ada820 14
tnhnrl 57:ec69651c8c21 15 class ConfigFileIO {
tnhnrl 57:ec69651c8c21 16 public:
tnhnrl 57:ec69651c8c21 17 ConfigFileIO();
joel_ssc 82:0981b9ada820 18 logFileNames logFilesStruct;
tnhnrl 73:f6f378311c8d 19 //modified this to save frequency and deadband 7/11/2018
tnhnrl 57:ec69651c8c21 20
tnhnrl 76:c802e1da4179 21 void saveBattData(float batt_p_gain, float batt_i_gain, float batt_d_gain, int batt_zeroOffset, float batt_filter_freq, float batt_deadband); //modified this because zero offsets are integers
tnhnrl 73:f6f378311c8d 22 void savePitchData(float pitch_p_gain, float pitch_i_gain, float pitch_d_gain, float pitch_zeroOffset, float pitch_filter_freq, float pitch_deadband);
tnhnrl 73:f6f378311c8d 23
tnhnrl 76:c802e1da4179 24 void saveBCEData(float bce_p_gain, float bce_i_gain, float bce_d_gain, int bce_zeroOffset, float bce_filter_freq, float bce_deadband); //modified this because zero offsets are integers
tnhnrl 73:f6f378311c8d 25 void saveDepthData(float depth_p_gain, float depth_i_gain, float depth_d_gain, float depth_zeroOffset, float depth_filter_freq, float depth_deadband);
tnhnrl 57:ec69651c8c21 26
tnhnrl 57:ec69651c8c21 27 void saveRudderData(float setMinDeg, float setMaxDeg, float setCenterPWM, float setMinPWM, float setMaxPWM);
tnhnrl 73:f6f378311c8d 28 void saveHeadingData(float heading_p_gain, float heading_i_gain, float heading_d_gain, float heading_zeroOffset, float heading_filter_freq, float heading_deadband);
tnhnrl 57:ec69651c8c21 29
tnhnrl 57:ec69651c8c21 30 //ConfigFunctions
tnhnrl 57:ec69651c8c21 31 int load_BCE_config();
joel_ssc 82:0981b9ada820 32 int load_LogVers_config(int print_diag); // jcw feb 2019
joel_ssc 82:0981b9ada820 33 void saveLogVersData(int logversion, int diagversion);
tnhnrl 57:ec69651c8c21 34 int load_BATT_config();
tnhnrl 57:ec69651c8c21 35 int load_DEPTH_config();
tnhnrl 57:ec69651c8c21 36 int load_PITCH_config();
tnhnrl 57:ec69651c8c21 37 int load_HEADING_config(); //heading outer loop of rudder servo
tnhnrl 57:ec69651c8c21 38 int load_RUDDER_config(); //rudder servo
tnhnrl 57:ec69651c8c21 39 int load_script();
tnhnrl 57:ec69651c8c21 40
tnhnrl 57:ec69651c8c21 41 private:
tnhnrl 57:ec69651c8c21 42 float _neutral_batt_pos_mm;
tnhnrl 57:ec69651c8c21 43 float _neutral_bce_pos_mm;
tnhnrl 57:ec69651c8c21 44 };
tnhnrl 57:ec69651c8c21 45 #endif