Mercurial > public > ostc4
diff Discovery/Src/simulation.c @ 973:79b522fbabe6 Evo_2_23
Deactivate deco gas calculation option:
In the previous version had the option to consider a deco gas i the calculation or not. Reason for this was to have the automatic gas suggestion available while the deco calculation is still based on the current gas.
This might cause a critical situation in case the diver is not sure if the option is active or not => In the new version the TTS / deco is always calculated considering all deco gases.
author | Ideenmodellierer |
---|---|
date | Sun, 26 Jan 2025 19:31:38 +0100 (2 months ago) |
parents | d565812061f4 |
children | f0622dd93fdf |
line wrap: on
line diff
--- a/Discovery/Src/simulation.c Sun Jan 19 21:03:42 2025 +0100 +++ b/Discovery/Src/simulation.c Sun Jan 26 19:31:38 2025 +0100 @@ -502,6 +502,7 @@ SDiveState * pDiveState = &stateSim; copyDiveSettingsToSim(); +#ifdef ENABLE_DECOCALC_OPTION /* activate deco calculation for all deco gases */ for(index = 0; index < 1 + (2*NUM_GASES); index++) { @@ -510,6 +511,7 @@ pDiveState->diveSettings.gas[index].note.ub.decocalc = 1; } } +#endif vpm_init(&pDiveState->vpm, pDiveState->diveSettings.vpm_conservatism, 0, 0); //buehlmann_init(); @@ -566,7 +568,10 @@ for(int i=1; i<=5;i++) { if((pDiveState->diveSettings.decogaslist[i].change_during_ascent_depth_meter_otherwise_zero == 0) - || (pDiveState->diveSettings.gas[pDiveState->diveSettings.decogaslist[i].GasIdInSettings].note.ub.decocalc == 0)) +#ifdef ENABLE_DECOCALC_OPTION + || (pDiveState->diveSettings.gas[pDiveState->diveSettings.decogaslist[i].GasIdInSettings].note.ub.decocalc == 0) +#endif + ) break; gasChangeListDepthGas20x2[ptrGasChangeList++] = pDiveState->diveSettings.decogaslist[i].change_during_ascent_depth_meter_otherwise_zero; gasChangeListDepthGas20x2[ptrGasChangeList++] = pDiveState->diveSettings.decogaslist[i].GasIdInSettings;