Mercurial > public > ostc4
diff Discovery/Src/buehlmann.c @ 981:c6c781a2e85b default
Merge into default
| author | heinrichsweikamp |
|---|---|
| date | Tue, 11 Feb 2025 18:12:00 +0100 |
| parents | 79b522fbabe6 |
| children | 7891160acde3 |
line wrap: on
line diff
--- a/Discovery/Src/buehlmann.c Tue Aug 13 13:24:54 2024 +0200 +++ b/Discovery/Src/buehlmann.c Tue Feb 11 18:12:00 2025 +0100 @@ -258,8 +258,14 @@ gStop.depth = next_depth; for(i = gGas_id + 1; i < BUEHLMANN_STRUCT_MAX_GASES; i++) { - if(pDiveSettings->decogaslist[i].change_during_ascent_depth_meter_otherwise_zero == 0) + if((pDiveSettings->decogaslist[i].change_during_ascent_depth_meter_otherwise_zero == 0) +#ifdef ENABLE_DECOCALC_OPTION + || (pDiveSettings->gas[pDiveSettings->decogaslist[i].GasIdInSettings].note.ub.decocalc == 0) +#endif + ) + { break; + } float pressureChange = ((float)pDiveSettings->decogaslist[i].change_during_ascent_depth_meter_otherwise_zero) / 10; if(gStop.depth <= pressureChange + 0.00001f) { @@ -458,8 +464,14 @@ pressureTop_tmp = pressureTop; for(i = gGas_id + 1; i < BUEHLMANN_STRUCT_MAX_GASES; i++) { - if(pDiveSettings->decogaslist[i].change_during_ascent_depth_meter_otherwise_zero == 0) + if((pDiveSettings->decogaslist[i].change_during_ascent_depth_meter_otherwise_zero == 0) +#ifdef ENABLE_DECOCALC_OPTION + || (pDiveSettings->gas[pDiveSettings->decogaslist[i].GasIdInSettings].note.ub.decocalc == 0) +#endif + ) + { break; + } pressureChange = gSurface_pressure_bar + ((float)pDiveSettings->decogaslist[i].change_during_ascent_depth_meter_otherwise_zero) / 10; if(pressureBottom <= pressureChange) { @@ -473,8 +485,15 @@ } for(i = gGas_id + 1; i < BUEHLMANN_STRUCT_MAX_GASES; i++) { - if(pDiveSettings->decogaslist[i].change_during_ascent_depth_meter_otherwise_zero == 0) + if((pDiveSettings->decogaslist[i].change_during_ascent_depth_meter_otherwise_zero == 0) +#ifdef ENABLE_DECOCALC_OPTION + || (pDiveSettings->gas[pDiveSettings->decogaslist[i].GasIdInSettings].note.ub.decocalc == 0) +#endif + ) + { break; + } + pressureChange = gSurface_pressure_bar + ((float)pDiveSettings->decogaslist[i].change_during_ascent_depth_meter_otherwise_zero)/ 10; if((pressureChange < pressureBottom) && (pressureChange > pressureTop)) {
