# HG changeset patch # User Ideenmodellierer # Date 1702843804 -3600 # Node ID e963d32f746e3d2a203cf45a548dbb00b8eff9c6 # Parent 7b0033246b12eb38bb527b32e918c84ca6f8258e Added selection if an active gas shall be used for deco calculation or not Calculate deco acording to gas deco calculation active bit diff -r 7b0033246b12 -r e963d32f746e Discovery/Src/buehlmann.c --- a/Discovery/Src/buehlmann.c Thu Nov 16 20:37:20 2023 +0100 +++ b/Discovery/Src/buehlmann.c Sun Dec 17 21:10:04 2023 +0100 @@ -258,8 +258,7 @@ 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) - || (pDiveSettings->gas[pDiveSettings->decogaslist[i].GasIdInSettings].note.ub.decocalc == 0)) + if(pDiveSettings->decogaslist[i].change_during_ascent_depth_meter_otherwise_zero == 0) break; float pressureChange = ((float)pDiveSettings->decogaslist[i].change_during_ascent_depth_meter_otherwise_zero) / 10; if(gStop.depth <= pressureChange + 0.00001f) @@ -459,8 +458,7 @@ 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) - || (pDiveSettings->gas[pDiveSettings->decogaslist[i].GasIdInSettings].note.ub.decocalc == 0)) + if(pDiveSettings->decogaslist[i].change_during_ascent_depth_meter_otherwise_zero == 0) break; pressureChange = gSurface_pressure_bar + ((float)pDiveSettings->decogaslist[i].change_during_ascent_depth_meter_otherwise_zero) / 10; if(pressureBottom <= pressureChange) @@ -475,8 +473,7 @@ } for(i = gGas_id + 1; i < BUEHLMANN_STRUCT_MAX_GASES; i++) { - if((pDiveSettings->decogaslist[i].change_during_ascent_depth_meter_otherwise_zero == 0) - || (pDiveSettings->gas[pDiveSettings->decogaslist[i].GasIdInSettings].note.ub.decocalc == 0)) + if(pDiveSettings->decogaslist[i].change_during_ascent_depth_meter_otherwise_zero == 0) break; pressureChange = gSurface_pressure_bar + ((float)pDiveSettings->decogaslist[i].change_during_ascent_depth_meter_otherwise_zero)/ 10; if((pressureChange < pressureBottom) && (pressureChange > pressureTop))