Mercurial > public > ostc4
annotate Discovery/Src/check_warning.c @ 574:01ee21dd311f
Improved focus detection:
In previous version th calibration window was turned into the current one. At all two translations were used causing a jitter. Now the current view is translated into the calibration windows by one step increasing the quality of the prediction.
Reworked detection of pitch/sector/scroll events:
Sector and scroll uses pitch angles to calculate the view to show. Movment detection uses movment, which may also be out of focus for a short time. To improve all detections these two use cases are now handled individual. Sector and scroll have increased action angle in case yaw and roll stay stable.
author | Ideenmodellierer |
---|---|
date | Wed, 25 Nov 2020 20:26:01 +0100 |
parents | d97f0e395058 |
children | 64bf41faab83 |
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)) | |
563 | 180 |
181 if(settingsGetPointer()->ppo2sensors_source == O2_SENSOR_SOURCE_OPTIC) | |
182 { | |
183 { | |
184 if(!get_HUD_battery_voltage_V()) | |
185 pDiveState->warnings.sensorLinkLost = 1; | |
186 } | |
187 test_O2_sensor_values_outOfBounds(&pDiveState->warnings.sensorOutOfBounds[0], &pDiveState->warnings.sensorOutOfBounds[1], &pDiveState->warnings.sensorOutOfBounds[2]); | |
188 } | |
38 | 189 return pDiveState->warnings.sensorLinkLost |
190 + pDiveState->warnings.sensorOutOfBounds[0] | |
191 + pDiveState->warnings.sensorOutOfBounds[1] | |
192 + pDiveState->warnings.sensorOutOfBounds[2]; | |
193 } | |
194 | |
195 | |
268
1b9847d40e81
cleanup: make things static where possible.
Jan Mulder <jlmulder@xs4all.nl>
parents:
38
diff
changeset
|
196 static int8_t check_BetterGas(SDiveState * pDiveState) |
38 | 197 { |
198 if(stateUsed->mode != MODE_DIVE) | |
199 { | |
200 pDiveState->warnings.betterGas = 0; | |
201 betterGasId = 0; | |
202 return 0; | |
203 } | |
204 | |
205 uint8_t gasIdOffset; | |
206 uint8_t bestGasDepth, betterGasIdLocal; | |
207 | |
208 SLifeData* pLifeData = &pDiveState->lifeData; | |
209 SDiveSettings* pDiveSettings = &pDiveState->diveSettings; | |
210 | |
211 pDiveState->warnings.betterGas = 0; | |
212 betterGasId = 0; | |
213 betterGasIdLocal = pLifeData->actualGas.GasIdInSettings; | |
214 bestGasDepth = 255; | |
215 | |
216 if(pDiveSettings->diveMode == DIVEMODE_CCR) | |
217 gasIdOffset = NUM_OFFSET_DILUENT; | |
218 else | |
219 gasIdOffset = 0; | |
220 | |
221 /* life data is float, gas data is uint8 */ | |
222 if(actualLeftMaxDepth(pDiveState)) /* deco gases */ | |
223 { | |
224 for(int i=1+gasIdOffset; i<= 5+gasIdOffset; i++) | |
225 { | |
226 if( (pDiveSettings->gas[i].note.ub.active) | |
227 && (pDiveSettings->gas[i].note.ub.deco) | |
228 && (pDiveSettings->gas[i].depth_meter) | |
229 && (pDiveSettings->gas[i].depth_meter >= (pLifeData->depth_meter - 0.01f )) | |
230 && (pDiveSettings->gas[i].depth_meter <= bestGasDepth) | |
231 ) | |
232 { | |
233 betterGasIdLocal = i; | |
234 bestGasDepth = pDiveSettings->gas[i].depth_meter; | |
235 } | |
236 } | |
237 | |
238 if(betterGasIdLocal != pLifeData->actualGas.GasIdInSettings) | |
239 { | |
240 if(!check_helper_same_oxygen_and_helium_content(&pDiveSettings->gas[betterGasIdLocal], &pDiveSettings->gas[pLifeData->actualGas.GasIdInSettings])) | |
241 { | |
242 betterGasId = betterGasIdLocal; | |
243 pDiveState->warnings.betterGas = 1; | |
244 } | |
245 } | |
246 } | |
247 else /* travel gases */ | |
248 { | |
249 bestGasDepth = 0; | |
250 //check for travalgas | |
251 for(int i=1+gasIdOffset; i<= 5+gasIdOffset; i++) | |
252 { | |
253 if( (pDiveSettings->gas[i].note.ub.active) | |
254 && (pDiveSettings->gas[i].note.ub.travel) | |
255 && (pDiveSettings->gas[i].depth_meter_travel) | |
256 && (pDiveSettings->gas[i].depth_meter_travel <= (pLifeData->depth_meter + 0.01f )) | |
257 && (pDiveSettings->gas[i].depth_meter_travel >= bestGasDepth) | |
258 ) | |
259 { | |
260 betterGasIdLocal = i; | |
261 bestGasDepth = pDiveSettings->gas[i].depth_meter; | |
262 } | |
263 } | |
264 | |
265 if(betterGasIdLocal != pLifeData->actualGas.GasIdInSettings) | |
266 { | |
267 if(!check_helper_same_oxygen_and_helium_content(&pDiveSettings->gas[betterGasIdLocal], &pDiveSettings->gas[pLifeData->actualGas.GasIdInSettings])) | |
268 { | |
269 betterGasId = betterGasIdLocal; | |
270 pDiveState->warnings.betterGas = 1; | |
271 } | |
272 } | |
273 } | |
274 return pDiveState->warnings.betterGas; | |
275 } | |
276 | |
277 /* check for better travel!!! setpoint hw 151210 | |
278 */ | |
268
1b9847d40e81
cleanup: make things static where possible.
Jan Mulder <jlmulder@xs4all.nl>
parents:
38
diff
changeset
|
279 static int8_t check_BetterSetpoint(SDiveState * pDiveState) |
38 | 280 { |
281 pDiveState->warnings.betterSetpoint = 0; | |
282 betterSetpointId = 0; | |
283 | |
284 if((stateUsed->mode != MODE_DIVE) || (pDiveState->diveSettings.diveMode != DIVEMODE_CCR) || (pDiveState->diveSettings.CCR_Mode != CCRMODE_FixedSetpoint)) | |
285 { | |
286 return 0; | |
287 } | |
288 | |
289 uint8_t bestSetpointDepth = 0; // travel the deeper, the better | |
290 uint8_t betterSetpointIdLocal = 0; // nothing better | |
291 | |
292 if(!actualLeftMaxDepth(pDiveState)) /* travel gases */ | |
293 { | |
294 for(int i=1; i<=NUM_GASES; i++) | |
295 { | |
296 if( (pDiveState->diveSettings.setpoint[i].note.ub.active) | |
297 && (pDiveState->diveSettings.setpoint[i].depth_meter) | |
298 && (pDiveState->diveSettings.setpoint[i].depth_meter <= ( pDiveState->lifeData.depth_meter + 0.01f )) | |
299 && (pDiveState->diveSettings.setpoint[i].depth_meter >= bestSetpointDepth) | |
300 ) | |
301 { | |
302 betterSetpointIdLocal = i; | |
303 bestSetpointDepth = pDiveState->diveSettings.setpoint[i].depth_meter; | |
304 } | |
305 } | |
306 if((betterSetpointIdLocal) && (pDiveState->diveSettings.setpoint[betterSetpointIdLocal].setpoint_cbar != pDiveState->lifeData.actualGas.setPoint_cbar)) | |
307 { | |
308 betterSetpointId = betterSetpointIdLocal; | |
309 pDiveState->warnings.betterSetpoint = 1; | |
310 } | |
311 } | |
312 return pDiveState->warnings.betterSetpoint; | |
313 } | |
314 | |
315 | |
316 /* hw 151030 | |
317 */ | |
268
1b9847d40e81
cleanup: make things static where possible.
Jan Mulder <jlmulder@xs4all.nl>
parents:
38
diff
changeset
|
318 static int8_t check_helper_same_oxygen_and_helium_content(SGasLine * gas1, SGasLine * gas2) |
38 | 319 { |
320 if(gas1->helium_percentage != gas2->helium_percentage) | |
321 return 0; | |
322 else | |
323 if(gas1->oxygen_percentage != gas2->oxygen_percentage) | |
324 return 0; | |
325 else | |
326 return 1; | |
327 } | |
328 | |
329 | |
268
1b9847d40e81
cleanup: make things static where possible.
Jan Mulder <jlmulder@xs4all.nl>
parents:
38
diff
changeset
|
330 static int8_t check_CNS(SDiveState * pDiveState) |
38 | 331 { |
332 if(stateUsed->mode != MODE_DIVE) | |
333 { | |
334 pDiveState->warnings.cnsHigh = 0; | |
335 return 0; | |
336 } | |
337 | |
338 if(pDiveState->lifeData.cns >= (float)(settingsGetPointer()->CNS_max)) | |
339 pDiveState->warnings.cnsHigh = 1; | |
340 else | |
341 pDiveState->warnings.cnsHigh = 0; | |
342 return pDiveState->warnings.cnsHigh; | |
343 } | |
344 | |
345 | |
268
1b9847d40e81
cleanup: make things static where possible.
Jan Mulder <jlmulder@xs4all.nl>
parents:
38
diff
changeset
|
346 static int8_t check_Battery(SDiveState * pDiveState) |
38 | 347 { |
348 if(pDiveState->lifeData.battery_charge < 10) | |
349 pDiveState->warnings.lowBattery = 1; | |
350 else | |
351 pDiveState->warnings.lowBattery = 0; | |
352 | |
353 return pDiveState->warnings.lowBattery; | |
354 } | |
355 | |
356 | |
268
1b9847d40e81
cleanup: make things static where possible.
Jan Mulder <jlmulder@xs4all.nl>
parents:
38
diff
changeset
|
357 static int8_t check_Deco(SDiveState * pDiveState) |
38 | 358 { |
359 if(stateUsed->mode != MODE_DIVE) | |
360 { | |
361 pDiveState->warnings.decoMissed = 0; | |
362 return 0; | |
363 } | |
364 | |
365 uint8_t depthNext = decom_get_actual_deco_stop(pDiveState); | |
366 | |
367 if(!depthNext) | |
368 pDiveState->warnings.decoMissed = 0; | |
369 else | |
370 if(pDiveState->lifeData.depth_meter + 0.1f < (float)depthNext) | |
371 pDiveState->warnings.decoMissed = 1; | |
372 else | |
373 pDiveState->warnings.decoMissed = 0; | |
374 | |
375 return pDiveState->warnings.decoMissed; | |
376 } | |
377 | |
378 | |
268
1b9847d40e81
cleanup: make things static where possible.
Jan Mulder <jlmulder@xs4all.nl>
parents:
38
diff
changeset
|
379 static int8_t check_AscentRate(SDiveState * pDiveState) |
38 | 380 { |
381 if(stateUsed->mode != MODE_DIVE) | |
382 { | |
383 pDiveState->warnings.ascentRateHigh = 0; | |
384 return 0; | |
385 } | |
386 | |
387 float warnAscentRateFloat; | |
388 | |
389 warnAscentRateFloat = (float)(settingsGetPointer()->ascent_MeterPerMinute_max); | |
390 | |
391 if(pDiveState->lifeData.ascent_rate_meter_per_min >= warnAscentRateFloat) | |
392 pDiveState->warnings.ascentRateHigh = 1; | |
393 else | |
394 pDiveState->warnings.ascentRateHigh = 0; | |
395 return pDiveState->warnings.ascentRateHigh; | |
396 } | |
397 | |
398 | |
268
1b9847d40e81
cleanup: make things static where possible.
Jan Mulder <jlmulder@xs4all.nl>
parents:
38
diff
changeset
|
399 static int8_t check_aGF(SDiveState * pDiveState) |
38 | 400 { |
401 if(stateUsed->mode != MODE_DIVE) | |
402 { | |
403 pDiveState->warnings.aGf = 0; | |
404 return 0; | |
405 } | |
406 | |
407 pDiveState->warnings.aGf = 0; | |
408 if(pDiveState->diveSettings.deco_type.ub.standard == GF_MODE) | |
409 { | |
410 if((pDiveState->diveSettings.gf_high != settingsGetPointer()->GF_high) || (pDiveState->diveSettings.gf_low != settingsGetPointer()->GF_low)) | |
411 pDiveState->warnings.aGf = 1; | |
412 } | |
413 return pDiveState->warnings.aGf; | |
414 } | |
415 | |
478
58200d756365
Development option only: Show Pressure update for a short time in the custom field (as warning)
ideenmodellierer
parents:
272
diff
changeset
|
416 #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
|
417 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
|
418 { |
58200d756365
Development option only: Show Pressure update for a short time in the custom field (as warning)
ideenmodellierer
parents:
272
diff
changeset
|
419 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
|
420 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
|
421 { |
58200d756365
Development option only: Show Pressure update for a short time in the custom field (as warning)
ideenmodellierer
parents:
272
diff
changeset
|
422 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
|
423 ret = 1; |
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 else |
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 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
|
428 } |
58200d756365
Development option only: Show Pressure update for a short time in the custom field (as warning)
ideenmodellierer
parents:
272
diff
changeset
|
429 return ret; |
58200d756365
Development option only: Show Pressure update for a short time in the custom field (as warning)
ideenmodellierer
parents:
272
diff
changeset
|
430 } |
58200d756365
Development option only: Show Pressure update for a short time in the custom field (as warning)
ideenmodellierer
parents:
272
diff
changeset
|
431 #endif |
38 | 432 /************************ (C) COPYRIGHT heinrichs weikamp *****END OF FILE****/ |
433 |