Mercurial > public > ostc4
diff Discovery/Src/buehlmann.c @ 830:b7d93ff6b3b2 Evo_2_23
Added selection if an active gas shall be used for deco calculation or not:
In previous version selecting a gas as deco gas automatically activated the gas for deco calculation. Some divers prever to have the deco time displayed which matches to the gas currently in use. These divers kept the gas deactivated unless they switch to it. Features like gas usability visualization or easy gas change using quick selection were not usable for these divers. With introduction of the new option the gas switching / visualization features may be used without having the gas been considered for calculation in the background. The option may be operated in the gas selection menu.
author | Ideenmodellierer |
---|---|
date | Thu, 16 Nov 2023 20:32:09 +0100 |
parents | 305f251cc981 |
children | e963d32f746e |
line wrap: on
line diff
--- a/Discovery/Src/buehlmann.c Thu Nov 16 20:25:01 2023 +0100 +++ b/Discovery/Src/buehlmann.c Thu Nov 16 20:32:09 2023 +0100 @@ -258,7 +258,8 @@ 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) + || (pDiveSettings->gas[pDiveSettings->decogaslist[i].GasIdInSettings].note.ub.decocalc == 0)) break; float pressureChange = ((float)pDiveSettings->decogaslist[i].change_during_ascent_depth_meter_otherwise_zero) / 10; if(gStop.depth <= pressureChange + 0.00001f) @@ -458,7 +459,8 @@ 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) + || (pDiveSettings->gas[pDiveSettings->decogaslist[i].GasIdInSettings].note.ub.decocalc == 0)) break; pressureChange = gSurface_pressure_bar + ((float)pDiveSettings->decogaslist[i].change_during_ascent_depth_meter_otherwise_zero) / 10; if(pressureBottom <= pressureChange) @@ -473,7 +475,8 @@ } 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) + || (pDiveSettings->gas[pDiveSettings->decogaslist[i].GasIdInSettings].note.ub.decocalc == 0)) break; pressureChange = gSurface_pressure_bar + ((float)pDiveSettings->decogaslist[i].change_during_ascent_depth_meter_otherwise_zero)/ 10; if((pressureChange < pressureBottom) && (pressureChange > pressureTop))