Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed MODSERIAL FATFileSystem
ConfigFileIO.hpp
00001 #include "mbed.h" 00002 #include "ConfigFile.h" 00003 #include <string> 00004 00005 #ifndef CONFIGFILEIO_HPP 00006 #define CONFIGFILEIO_HPP 00007 struct logFileNames { 00008 string diagFileName; 00009 string logFileName; 00010 int logversion; 00011 int diagversion; 00012 }; 00013 struct neutralStatus { 00014 int setval; 00015 int bce_neutral_mm; 00016 int batt_neutral_mm; 00017 }; 00018 00019 00020 class ConfigFileIO { 00021 public: 00022 ConfigFileIO(); 00023 logFileNames logFilesStruct; 00024 neutralStatus neutralStruct; 00025 00026 //modified savebatt to save frequency and deadband 7/11/2018 00027 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 00028 void savePitchData(float pitch_p_gain, float pitch_i_gain, float pitch_d_gain, float pitch_zeroOffset, float pitch_filter_freq, float pitch_deadband); 00029 00030 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 00031 void saveDepthData(float depth_p_gain, float depth_i_gain, float depth_d_gain, float depth_zeroOffset, float depth_filter_freq, float depth_deadband); 00032 00033 void saveRudderData(float setMinDeg, float setMaxDeg, float setCenterPWM, float setMinPWM, float setMaxPWM); 00034 void saveHeadingData(float heading_p_gain, float heading_i_gain, float heading_d_gain, float heading_zeroOffset, float heading_filter_freq, float heading_deadband); 00035 00036 //ConfigFunctions 00037 int load_BCE_config(); 00038 int load_LogVers_config(int print_diag); // jcw feb 2019 00039 void saveNeutralStatus(int setval, int bce_neutral_mm, int batt_neutral_mm); 00040 int load_setneutral_status(); 00041 void report_no_neutral_found(int bce_last_pos, int batt_last_pos); 00042 void save_FinalTime(); 00043 void report_still_inverted( float roll_value, int yotime); 00044 void saveLogVersData(int logversion, int diagversion); 00045 int load_BATT_config(); 00046 int load_DEPTH_config(); 00047 int load_PITCH_config(); 00048 int load_StartTime(); 00049 int load_HEADING_config(); //heading outer loop of rudder servo 00050 int load_RUDDER_config(); //rudder servo 00051 int load_script(); 00052 00053 private: 00054 float _neutral_batt_pos_mm; 00055 float _neutral_bce_pos_mm; 00056 }; 00057 #endif
Generated on Thu Jul 14 2022 10:54:35 by
1.7.2