Mercurial > public > ostc4
annotate Discovery/Src/check_warning.c @ 519:2c49561c8062
Reset Safety Stop display in case of a new descend:
In previous version safety stop was displayed in while the stop depth was reached. The count down was interrupted in case of a new descend but the safety stop was still displayed, blocking the NDL visualization in the big font view. To avoid this scenario a restart function has been added which will return to NDL view in case of a descend > 2m. If just a short drop happend then the countdown will be continued when the safety stop depth is reached again. If that takes more then a minute the safety stop counter is restarted.
author | Ideenmodellierer |
---|---|
date | Sun, 06 Sep 2020 22:11:51 +0200 |
parents | 58200d756365 |
children | d97f0e395058 |
rev | line source |
---|---|
38 | 1 /** |
2 ****************************************************************************** | |
3 * @file check_warning.c | |
4 * @author heinrichs weikamp gmbh | |
5 * @date 17-Nov-2014 | |
6 * @version V0.0.1 | |
7 * @since 17-Nov-2014 | |
8 * @brief check and set warnings for warnings | |
9 * | |
10 @verbatim | |
11 ============================================================================== | |
12 ##### How to use ##### | |
13 ============================================================================== | |
14 OSTC3 Warnings: | |
15 niedriger Batteriezustand ( | |
16 zu hoher oder zu niedriger Sauerstoffpartialdruck (ppO2) 0.2 - 1.6 | |
17 zu hoher CNS (Gefahr der Sauerstoffvergiftung) 90% | |
18 zu hohe Gradientenfaktoren 90 - 90 | |
19 Missachtung der Dekostopps (der �berschrittene Dekostopp wird rot angezeigt) 0 m | |
20 zu hohe Aufstiegsgeschwindigkeit 30 m/min | |
21 aGF-Warnung: die Berechnung der Dekompression wird �ber alternative GF-Werte durchgef�hrt | |
22 Fallback-Warnung bei ausgefallenem Sensor | |
23 | |
24 @endverbatim | |
25 ****************************************************************************** | |
26 * @attention | |
27 * | |
28 * <h2><center>© COPYRIGHT(c) 2014 heinrichs weikamp</center></h2> | |
29 * | |
30 ****************************************************************************** | |
31 */ | |
32 | |
33 /* Includes ------------------------------------------------------------------*/ | |
34 | |
35 #include "data_exchange.h" | |
36 #include "check_warning.h" | |
37 #include "settings.h" | |
38 #include "decom.h" | |
39 #include "tCCR.h" | |
40 | |
268
1b9847d40e81
cleanup: make things static where possible.
Jan Mulder <jlmulder@xs4all.nl>
parents:
38
diff
changeset
|
41 /* Private variables with access ----------------------------------------------*/ |
1b9847d40e81
cleanup: make things static where possible.
Jan Mulder <jlmulder@xs4all.nl>
parents:
38
diff
changeset
|
42 static uint8_t betterGasId = 0; |
1b9847d40e81
cleanup: make things static where possible.
Jan Mulder <jlmulder@xs4all.nl>
parents:
38
diff
changeset
|
43 static uint8_t betterSetpointId = 0; |
1b9847d40e81
cleanup: make things static where possible.
Jan Mulder <jlmulder@xs4all.nl>
parents:
38
diff
changeset
|
44 static int8_t fallback = 0; |
38 | 45 |
46 /* Private function prototypes -----------------------------------------------*/ | |
268
1b9847d40e81
cleanup: make things static where possible.
Jan Mulder <jlmulder@xs4all.nl>
parents:
38
diff
changeset
|
47 static int8_t check_fallback(SDiveState * pDiveState); |
1b9847d40e81
cleanup: make things static where possible.
Jan Mulder <jlmulder@xs4all.nl>
parents:
38
diff
changeset
|
48 static int8_t check_ppO2(SDiveState * pDiveState); |
1b9847d40e81
cleanup: make things static where possible.
Jan Mulder <jlmulder@xs4all.nl>
parents:
38
diff
changeset
|
49 static int8_t check_O2_sensors(SDiveState * pDiveState); |
1b9847d40e81
cleanup: make things static where possible.
Jan Mulder <jlmulder@xs4all.nl>
parents:
38
diff
changeset
|
50 static int8_t check_CNS(SDiveState * pDiveState); |
1b9847d40e81
cleanup: make things static where possible.
Jan Mulder <jlmulder@xs4all.nl>
parents:
38
diff
changeset
|
51 static int8_t check_Deco(SDiveState * pDiveState); |
1b9847d40e81
cleanup: make things static where possible.
Jan Mulder <jlmulder@xs4all.nl>
parents:
38
diff
changeset
|
52 static int8_t check_AscentRate(SDiveState * pDiveState); |
1b9847d40e81
cleanup: make things static where possible.
Jan Mulder <jlmulder@xs4all.nl>
parents:
38
diff
changeset
|
53 static int8_t check_aGF(SDiveState * pDiveState); |
1b9847d40e81
cleanup: make things static where possible.
Jan Mulder <jlmulder@xs4all.nl>
parents:
38
diff
changeset
|
54 static int8_t check_BetterGas(SDiveState * pDiveState); |
1b9847d40e81
cleanup: make things static where possible.
Jan Mulder <jlmulder@xs4all.nl>
parents:
38
diff
changeset
|
55 static int8_t check_BetterSetpoint(SDiveState * pDiveState); |
1b9847d40e81
cleanup: make things static where possible.
Jan Mulder <jlmulder@xs4all.nl>
parents:
38
diff
changeset
|
56 static int8_t check_Battery(SDiveState * pDiveState); |
478
58200d756365
Development option only: Show Pressure update for a short time in the custom field (as warning)
ideenmodellierer
parents:
272
diff
changeset
|
57 #ifdef ENABLE_BOTTLE_SENSOR |
58200d756365
Development option only: Show Pressure update for a short time in the custom field (as warning)
ideenmodellierer
parents:
272
diff
changeset
|
58 static int8_t check_pressureSensor(SDiveState * pDiveState); |
58200d756365
Development option only: Show Pressure update for a short time in the custom field (as warning)
ideenmodellierer
parents:
272
diff
changeset
|
59 #endif |
268
1b9847d40e81
cleanup: make things static where possible.
Jan Mulder <jlmulder@xs4all.nl>
parents:
38
diff
changeset
|
60 static int8_t check_helper_same_oxygen_and_helium_content(SGasLine * gas1, SGasLine * gas2); |
38 | 61 |
62 /* Exported functions --------------------------------------------------------*/ | |
63 | |
64 void check_warning(void) | |
65 { | |
272
74a8296a2318
cleanup: simplify stateUsed usage
Jan Mulder <jlmulder@xs4all.nl>
parents:
268
diff
changeset
|
66 check_warning2(stateUsedWrite); |
38 | 67 } |
68 | |
69 | |
70 void check_warning2(SDiveState * pDiveState) | |
71 { | |
72 pDiveState->warnings.numWarnings = 0; | |
73 | |
74 pDiveState->warnings.numWarnings += check_aGF(pDiveState); | |
75 pDiveState->warnings.numWarnings += check_AscentRate(pDiveState); | |
76 pDiveState->warnings.numWarnings += check_CNS(pDiveState); | |
77 pDiveState->warnings.numWarnings += check_Deco(pDiveState); | |
78 pDiveState->warnings.numWarnings += check_ppO2(pDiveState); | |
79 pDiveState->warnings.numWarnings += check_O2_sensors(pDiveState); | |
80 pDiveState->warnings.numWarnings += check_BetterGas(pDiveState); | |
81 pDiveState->warnings.numWarnings += check_BetterSetpoint(pDiveState); | |
82 pDiveState->warnings.numWarnings += check_Battery(pDiveState); | |
83 pDiveState->warnings.numWarnings += check_fallback(pDiveState); | |
478
58200d756365
Development option only: Show Pressure update for a short time in the custom field (as warning)
ideenmodellierer
parents:
272
diff
changeset
|
84 #ifdef ENABLE_BOTTLE_SENSOR |
58200d756365
Development option only: Show Pressure update for a short time in the custom field (as warning)
ideenmodellierer
parents:
272
diff
changeset
|
85 pDiveState->warnings.numWarnings += check_pressureSensor(pDiveState); |
58200d756365
Development option only: Show Pressure update for a short time in the custom field (as warning)
ideenmodellierer
parents:
272
diff
changeset
|
86 #endif |
38 | 87 } |
88 | |
89 | |
90 void set_warning_fallback(void) | |
91 { | |
92 fallback = 1; | |
93 } | |
94 | |
95 | |
96 void clear_warning_fallback(void) | |
97 { | |
98 fallback = 0; | |
99 } | |
100 | |
101 | |
102 uint8_t actualBetterGasId(void) | |
103 { | |
104 return betterGasId; | |
105 } | |
106 | |
107 | |
108 uint8_t actualBetterSetpointId(void) | |
109 { | |
110 return betterSetpointId; | |
111 } | |
112 | |
113 | |
114 uint8_t actualLeftMaxDepth(const SDiveState * pDiveState) | |
115 { | |
116 if(pDiveState->lifeData.depth_meter > (pDiveState->lifeData.max_depth_meter - 3.0f)) | |
117 return 0; | |
118 else | |
119 return 1; | |
120 } | |
121 | |
122 | |
123 /* Private functions ---------------------------------------------------------*/ | |
268
1b9847d40e81
cleanup: make things static where possible.
Jan Mulder <jlmulder@xs4all.nl>
parents:
38
diff
changeset
|
124 static int8_t check_fallback(SDiveState * pDiveState) |
38 | 125 { |
126 if(fallback && ((pDiveState->mode != MODE_DIVE) || (pDiveState->diveSettings.diveMode != DIVEMODE_CCR))) | |
127 fallback = 0; | |
128 | |
129 pDiveState->warnings.fallback = fallback; | |
130 return pDiveState->warnings.fallback; | |
131 } | |
132 | |
133 | |
268
1b9847d40e81
cleanup: make things static where possible.
Jan Mulder <jlmulder@xs4all.nl>
parents:
38
diff
changeset
|
134 static int8_t check_ppO2(SDiveState * pDiveState) |
38 | 135 { |
136 if(pDiveState->mode != MODE_DIVE) | |
137 { | |
138 pDiveState->warnings.ppO2Low = 0; | |
139 pDiveState->warnings.ppO2High = 0; | |
140 return 0; | |
141 } | |
142 | |
143 uint8_t localPPO2, testPPO2high; | |
144 | |
145 if(pDiveState->lifeData.ppO2 < 0) | |
146 localPPO2 = 0; | |
147 else | |
148 if(pDiveState->lifeData.ppO2 >= 2.5f) | |
149 localPPO2 = 255; | |
150 else | |
151 localPPO2 = (uint8_t)(pDiveState->lifeData.ppO2 * 100); | |
152 | |
153 if((localPPO2 + 1) <= settingsGetPointer()->ppO2_min) | |
154 pDiveState->warnings.ppO2Low = 1; | |
155 else | |
156 pDiveState->warnings.ppO2Low = 0; | |
157 | |
158 if(actualLeftMaxDepth(pDiveState)) | |
159 testPPO2high = settingsGetPointer()->ppO2_max_deco; | |
160 else | |
161 testPPO2high = settingsGetPointer()->ppO2_max_std; | |
162 | |
163 if(localPPO2 >= (testPPO2high + 1)) | |
164 pDiveState->warnings.ppO2High = 1; | |
165 else | |
166 pDiveState->warnings.ppO2High = 0; | |
167 | |
168 return pDiveState->warnings.ppO2Low + pDiveState->warnings.ppO2High; | |
169 } | |
170 | |
171 | |
268
1b9847d40e81
cleanup: make things static where possible.
Jan Mulder <jlmulder@xs4all.nl>
parents:
38
diff
changeset
|
172 static int8_t check_O2_sensors(SDiveState * pDiveState) |
38 | 173 { |
174 pDiveState->warnings.sensorLinkLost = 0; | |
175 pDiveState->warnings.sensorOutOfBounds[0] = 0; | |
176 pDiveState->warnings.sensorOutOfBounds[1] = 0; | |
177 pDiveState->warnings.sensorOutOfBounds[2] = 0; | |
178 | |
179 if((pDiveState->diveSettings.diveMode == DIVEMODE_CCR) && (pDiveState->diveSettings.CCR_Mode == CCRMODE_Sensors)) | |
180 { | |
181 if(!get_HUD_battery_voltage_V()) | |
182 pDiveState->warnings.sensorLinkLost = 1; | |
183 | |
184 test_HUD_sensor_values_outOfBounds(&pDiveState->warnings.sensorOutOfBounds[0], &pDiveState->warnings.sensorOutOfBounds[1], &pDiveState->warnings.sensorOutOfBounds[2]); | |
185 | |
186 } | |
187 return pDiveState->warnings.sensorLinkLost | |
188 + pDiveState->warnings.sensorOutOfBounds[0] | |
189 + pDiveState->warnings.sensorOutOfBounds[1] | |
190 + pDiveState->warnings.sensorOutOfBounds[2]; | |
191 } | |
192 | |
193 | |
268
1b9847d40e81
cleanup: make things static where possible.
Jan Mulder <jlmulder@xs4all.nl>
parents:
38
diff
changeset
|
194 static int8_t check_BetterGas(SDiveState * pDiveState) |
38 | 195 { |
196 if(stateUsed->mode != MODE_DIVE) | |
197 { | |
198 pDiveState->warnings.betterGas = 0; | |
199 betterGasId = 0; | |
200 return 0; | |
201 } | |
202 | |
203 uint8_t gasIdOffset; | |
204 uint8_t bestGasDepth, betterGasIdLocal; | |
205 | |
206 SLifeData* pLifeData = &pDiveState->lifeData; | |
207 SDiveSettings* pDiveSettings = &pDiveState->diveSettings; | |
208 | |
209 pDiveState->warnings.betterGas = 0; | |
210 betterGasId = 0; | |
211 betterGasIdLocal = pLifeData->actualGas.GasIdInSettings; | |
212 bestGasDepth = 255; | |
213 | |
214 if(pDiveSettings->diveMode == DIVEMODE_CCR) | |
215 gasIdOffset = NUM_OFFSET_DILUENT; | |
216 else | |
217 gasIdOffset = 0; | |
218 | |
219 /* life data is float, gas data is uint8 */ | |
220 if(actualLeftMaxDepth(pDiveState)) /* deco gases */ | |
221 { | |
222 for(int i=1+gasIdOffset; i<= 5+gasIdOffset; i++) | |
223 { | |
224 if( (pDiveSettings->gas[i].note.ub.active) | |
225 && (pDiveSettings->gas[i].note.ub.deco) | |
226 && (pDiveSettings->gas[i].depth_meter) | |
227 && (pDiveSettings->gas[i].depth_meter >= (pLifeData->depth_meter - 0.01f )) | |
228 && (pDiveSettings->gas[i].depth_meter <= bestGasDepth) | |
229 ) | |
230 { | |
231 betterGasIdLocal = i; | |
232 bestGasDepth = pDiveSettings->gas[i].depth_meter; | |
233 } | |
234 } | |
235 | |
236 if(betterGasIdLocal != pLifeData->actualGas.GasIdInSettings) | |
237 { | |
238 if(!check_helper_same_oxygen_and_helium_content(&pDiveSettings->gas[betterGasIdLocal], &pDiveSettings->gas[pLifeData->actualGas.GasIdInSettings])) | |
239 { | |
240 betterGasId = betterGasIdLocal; | |
241 pDiveState->warnings.betterGas = 1; | |
242 } | |
243 } | |
244 } | |
245 else /* travel gases */ | |
246 { | |
247 bestGasDepth = 0; | |
248 //check for travalgas | |
249 for(int i=1+gasIdOffset; i<= 5+gasIdOffset; i++) | |
250 { | |
251 if( (pDiveSettings->gas[i].note.ub.active) | |
252 && (pDiveSettings->gas[i].note.ub.travel) | |
253 && (pDiveSettings->gas[i].depth_meter_travel) | |
254 && (pDiveSettings->gas[i].depth_meter_travel <= (pLifeData->depth_meter + 0.01f )) | |
255 && (pDiveSettings->gas[i].depth_meter_travel >= bestGasDepth) | |
256 ) | |
257 { | |
258 betterGasIdLocal = i; | |
259 bestGasDepth = pDiveSettings->gas[i].depth_meter; | |
260 } | |
261 } | |
262 | |
263 if(betterGasIdLocal != pLifeData->actualGas.GasIdInSettings) | |
264 { | |
265 if(!check_helper_same_oxygen_and_helium_content(&pDiveSettings->gas[betterGasIdLocal], &pDiveSettings->gas[pLifeData->actualGas.GasIdInSettings])) | |
266 { | |
267 betterGasId = betterGasIdLocal; | |
268 pDiveState->warnings.betterGas = 1; | |
269 } | |
270 } | |
271 } | |
272 return pDiveState->warnings.betterGas; | |
273 } | |
274 | |
275 /* check for better travel!!! setpoint hw 151210 | |
276 */ | |
268
1b9847d40e81
cleanup: make things static where possible.
Jan Mulder <jlmulder@xs4all.nl>
parents:
38
diff
changeset
|
277 static int8_t check_BetterSetpoint(SDiveState * pDiveState) |
38 | 278 { |
279 pDiveState->warnings.betterSetpoint = 0; | |
280 betterSetpointId = 0; | |
281 | |
282 if((stateUsed->mode != MODE_DIVE) || (pDiveState->diveSettings.diveMode != DIVEMODE_CCR) || (pDiveState->diveSettings.CCR_Mode != CCRMODE_FixedSetpoint)) | |
283 { | |
284 return 0; | |
285 } | |
286 | |
287 uint8_t bestSetpointDepth = 0; // travel the deeper, the better | |
288 uint8_t betterSetpointIdLocal = 0; // nothing better | |
289 | |
290 if(!actualLeftMaxDepth(pDiveState)) /* travel gases */ | |
291 { | |
292 for(int i=1; i<=NUM_GASES; i++) | |
293 { | |
294 if( (pDiveState->diveSettings.setpoint[i].note.ub.active) | |
295 && (pDiveState->diveSettings.setpoint[i].depth_meter) | |
296 && (pDiveState->diveSettings.setpoint[i].depth_meter <= ( pDiveState->lifeData.depth_meter + 0.01f )) | |
297 && (pDiveState->diveSettings.setpoint[i].depth_meter >= bestSetpointDepth) | |
298 ) | |
299 { | |
300 betterSetpointIdLocal = i; | |
301 bestSetpointDepth = pDiveState->diveSettings.setpoint[i].depth_meter; | |
302 } | |
303 } | |
304 if((betterSetpointIdLocal) && (pDiveState->diveSettings.setpoint[betterSetpointIdLocal].setpoint_cbar != pDiveState->lifeData.actualGas.setPoint_cbar)) | |
305 { | |
306 betterSetpointId = betterSetpointIdLocal; | |
307 pDiveState->warnings.betterSetpoint = 1; | |
308 } | |
309 } | |
310 return pDiveState->warnings.betterSetpoint; | |
311 } | |
312 | |
313 | |
314 /* hw 151030 | |
315 */ | |
268
1b9847d40e81
cleanup: make things static where possible.
Jan Mulder <jlmulder@xs4all.nl>
parents:
38
diff
changeset
|
316 static int8_t check_helper_same_oxygen_and_helium_content(SGasLine * gas1, SGasLine * gas2) |
38 | 317 { |
318 if(gas1->helium_percentage != gas2->helium_percentage) | |
319 return 0; | |
320 else | |
321 if(gas1->oxygen_percentage != gas2->oxygen_percentage) | |
322 return 0; | |
323 else | |
324 return 1; | |
325 } | |
326 | |
327 | |
268
1b9847d40e81
cleanup: make things static where possible.
Jan Mulder <jlmulder@xs4all.nl>
parents:
38
diff
changeset
|
328 static int8_t check_CNS(SDiveState * pDiveState) |
38 | 329 { |
330 if(stateUsed->mode != MODE_DIVE) | |
331 { | |
332 pDiveState->warnings.cnsHigh = 0; | |
333 return 0; | |
334 } | |
335 | |
336 if(pDiveState->lifeData.cns >= (float)(settingsGetPointer()->CNS_max)) | |
337 pDiveState->warnings.cnsHigh = 1; | |
338 else | |
339 pDiveState->warnings.cnsHigh = 0; | |
340 return pDiveState->warnings.cnsHigh; | |
341 } | |
342 | |
343 | |
268
1b9847d40e81
cleanup: make things static where possible.
Jan Mulder <jlmulder@xs4all.nl>
parents:
38
diff
changeset
|
344 static int8_t check_Battery(SDiveState * pDiveState) |
38 | 345 { |
346 if(pDiveState->lifeData.battery_charge < 10) | |
347 pDiveState->warnings.lowBattery = 1; | |
348 else | |
349 pDiveState->warnings.lowBattery = 0; | |
350 | |
351 return pDiveState->warnings.lowBattery; | |
352 } | |
353 | |
354 | |
268
1b9847d40e81
cleanup: make things static where possible.
Jan Mulder <jlmulder@xs4all.nl>
parents:
38
diff
changeset
|
355 static int8_t check_Deco(SDiveState * pDiveState) |
38 | 356 { |
357 if(stateUsed->mode != MODE_DIVE) | |
358 { | |
359 pDiveState->warnings.decoMissed = 0; | |
360 return 0; | |
361 } | |
362 | |
363 uint8_t depthNext = decom_get_actual_deco_stop(pDiveState); | |
364 | |
365 if(!depthNext) | |
366 pDiveState->warnings.decoMissed = 0; | |
367 else | |
368 if(pDiveState->lifeData.depth_meter + 0.1f < (float)depthNext) | |
369 pDiveState->warnings.decoMissed = 1; | |
370 else | |
371 pDiveState->warnings.decoMissed = 0; | |
372 | |
373 return pDiveState->warnings.decoMissed; | |
374 } | |
375 | |
376 | |
268
1b9847d40e81
cleanup: make things static where possible.
Jan Mulder <jlmulder@xs4all.nl>
parents:
38
diff
changeset
|
377 static int8_t check_AscentRate(SDiveState * pDiveState) |
38 | 378 { |
379 if(stateUsed->mode != MODE_DIVE) | |
380 { | |
381 pDiveState->warnings.ascentRateHigh = 0; | |
382 return 0; | |
383 } | |
384 | |
385 float warnAscentRateFloat; | |
386 | |
387 warnAscentRateFloat = (float)(settingsGetPointer()->ascent_MeterPerMinute_max); | |
388 | |
389 if(pDiveState->lifeData.ascent_rate_meter_per_min >= warnAscentRateFloat) | |
390 pDiveState->warnings.ascentRateHigh = 1; | |
391 else | |
392 pDiveState->warnings.ascentRateHigh = 0; | |
393 return pDiveState->warnings.ascentRateHigh; | |
394 } | |
395 | |
396 | |
268
1b9847d40e81
cleanup: make things static where possible.
Jan Mulder <jlmulder@xs4all.nl>
parents:
38
diff
changeset
|
397 static int8_t check_aGF(SDiveState * pDiveState) |
38 | 398 { |
399 if(stateUsed->mode != MODE_DIVE) | |
400 { | |
401 pDiveState->warnings.aGf = 0; | |
402 return 0; | |
403 } | |
404 | |
405 pDiveState->warnings.aGf = 0; | |
406 if(pDiveState->diveSettings.deco_type.ub.standard == GF_MODE) | |
407 { | |
408 if((pDiveState->diveSettings.gf_high != settingsGetPointer()->GF_high) || (pDiveState->diveSettings.gf_low != settingsGetPointer()->GF_low)) | |
409 pDiveState->warnings.aGf = 1; | |
410 } | |
411 return pDiveState->warnings.aGf; | |
412 } | |
413 | |
478
58200d756365
Development option only: Show Pressure update for a short time in the custom field (as warning)
ideenmodellierer
parents:
272
diff
changeset
|
414 #ifdef ENABLE_BOTTLE_SENSOR |
58200d756365
Development option only: Show Pressure update for a short time in the custom field (as warning)
ideenmodellierer
parents:
272
diff
changeset
|
415 static int8_t check_pressureSensor(SDiveState * pDiveState) |
58200d756365
Development option only: Show Pressure update for a short time in the custom field (as warning)
ideenmodellierer
parents:
272
diff
changeset
|
416 { |
58200d756365
Development option only: Show Pressure update for a short time in the custom field (as warning)
ideenmodellierer
parents:
272
diff
changeset
|
417 int8_t ret = 0; |
58200d756365
Development option only: Show Pressure update for a short time in the custom field (as warning)
ideenmodellierer
parents:
272
diff
changeset
|
418 if(pDiveState->lifeData.bottle_bar_age_MilliSeconds[pDiveState->lifeData.actualGas.GasIdInSettings] < 50) /* we received a new value */ |
58200d756365
Development option only: Show Pressure update for a short time in the custom field (as warning)
ideenmodellierer
parents:
272
diff
changeset
|
419 { |
58200d756365
Development option only: Show Pressure update for a short time in the custom field (as warning)
ideenmodellierer
parents:
272
diff
changeset
|
420 pDiveState->warnings.newPressure = stateUsed->lifeData.bottle_bar[stateUsed->lifeData.actualGas.GasIdInSettings]; |
58200d756365
Development option only: Show Pressure update for a short time in the custom field (as warning)
ideenmodellierer
parents:
272
diff
changeset
|
421 ret = 1; |
58200d756365
Development option only: Show Pressure update for a short time in the custom field (as warning)
ideenmodellierer
parents:
272
diff
changeset
|
422 } |
58200d756365
Development option only: Show Pressure update for a short time in the custom field (as warning)
ideenmodellierer
parents:
272
diff
changeset
|
423 else |
58200d756365
Development option only: Show Pressure update for a short time in the custom field (as warning)
ideenmodellierer
parents:
272
diff
changeset
|
424 { |
58200d756365
Development option only: Show Pressure update for a short time in the custom field (as warning)
ideenmodellierer
parents:
272
diff
changeset
|
425 pDiveState->warnings.newPressure = 0; |
58200d756365
Development option only: Show Pressure update for a short time in the custom field (as warning)
ideenmodellierer
parents:
272
diff
changeset
|
426 } |
58200d756365
Development option only: Show Pressure update for a short time in the custom field (as warning)
ideenmodellierer
parents:
272
diff
changeset
|
427 return ret; |
58200d756365
Development option only: Show Pressure update for a short time in the custom field (as warning)
ideenmodellierer
parents:
272
diff
changeset
|
428 } |
58200d756365
Development option only: Show Pressure update for a short time in the custom field (as warning)
ideenmodellierer
parents:
272
diff
changeset
|
429 #endif |
38 | 430 /************************ (C) COPYRIGHT heinrichs weikamp *****END OF FILE****/ |
431 |