comparison Common/Inc/data_central.h @ 307:b6436edfb2c0 cleanup-4

cleanup: factor out unused stopwatch code Visually, this looks a bit of a dangerous cleanup, but its not :-) To explain this cleanup: stopwatch_seconds is never used, so assign to it is useless, and the variable can be removed. Now, stopwatch_start_at_this_dive_time_seconds is not used any more, so remove it as well. Now, look at the boolResetStopwatch code. It is used but only to reset itself. This makes the whole stopwatch block in data_exchange_main.c a useless thing. All the other cleanup is trivial. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
author Jan Mulder <jlmulder@xs4all.nl>
date Wed, 22 May 2019 22:22:15 +0200
parents 54d14bc2083c
children b0045281cb2d
comparison
equal deleted inserted replaced
306:2f43419102c8 307:b6436edfb2c0
154 154
155 typedef struct 155 typedef struct
156 { 156 {
157 uint32_t average_depth_meter_Count; 157 uint32_t average_depth_meter_Count;
158 uint32_t average_depth_last_update_dive_time_seconds_without_surface_time; 158 uint32_t average_depth_last_update_dive_time_seconds_without_surface_time;
159 int32_t stopwatch_start_at_this_dive_time_seconds;
160 } SHelper; 159 } SHelper;
161 160
162 /* struct SLifeData 161 /* struct SLifeData
163 * contains data all actual data (pressure, stuturation, etc. as received from second ship 162 * contains data all actual data (pressure, stuturation, etc. as received from second ship
164 * and has actualGas to be send to Small CPU (second chip) 163 * and has actualGas to be send to Small CPU (second chip)
211 float max_depth_meter; 210 float max_depth_meter;
212 float average_depth_meter; 211 float average_depth_meter;
213 float apnea_total_max_depth_meter; 212 float apnea_total_max_depth_meter;
214 float apnea_last_max_depth_meter; 213 float apnea_last_max_depth_meter;
215 int32_t apnea_last_dive_time_seconds; 214 int32_t apnea_last_dive_time_seconds;
216 int32_t stopwatch_seconds;
217 uint16_t bottle_bar[2 * NUM_GASES +1]; 215 uint16_t bottle_bar[2 * NUM_GASES +1];
218 uint16_t bottle_bar_age_MilliSeconds[2 * NUM_GASES + 1]; 216 uint16_t bottle_bar_age_MilliSeconds[2 * NUM_GASES + 1];
219 uint16_t apnea_total_counter; 217 uint16_t apnea_total_counter;
220 218
221 /* control of DataEX_copy_to_LifeData() 219 /* control of DataEX_copy_to_LifeData()
222 */ 220 */
223 uint8_t boolResetAverageDepth; 221 uint8_t boolResetAverageDepth;
224 uint8_t boolResetStopwatch;
225 uint8_t bool_temp1; 222 uint8_t bool_temp1;
226 uint8_t bool_temp2; 223 uint8_t bool_temp2;
227 224
228 /* from local sensor or direct HUD communication */ 225 /* from local sensor or direct HUD communication */
229 //pp O2 Sensor 226 //pp O2 Sensor