Mercurial > public > ostc4
diff Discovery/Src/simulation.c @ 888:07af9efd7c13 Evo_2_23
Dev bugfix: Consider decogas in planner independen from calculation setting:
Some time ago the selection if a deco gas is used for live deco calculation or not was introduced. The planner did not consider the option as well causing it to ingnore deco gases in the planning what is not intended. To fix this the calculation flag is set at planer simulation start for all deco gases.
Beside this the cursor is now placed in the bottom line at "next" instead of the first menu item.
author | Ideenmodellierer |
---|---|
date | Tue, 03 Sep 2024 20:46:42 +0200 |
parents | b7d93ff6b3b2 |
children | 65772ddee88c |
line wrap: on
line diff
--- a/Discovery/Src/simulation.c Tue Sep 03 15:30:53 2024 +0200 +++ b/Discovery/Src/simulation.c Tue Sep 03 20:46:42 2024 +0200 @@ -406,12 +406,22 @@ SDecoinfo* simulation_decoplaner(uint16_t depth_meter, uint16_t intervall_time_minutes, uint16_t dive_time_minutes, uint8_t *gasChangeListDepthGas20x2) { uint8_t ptrGasChangeList = 0; // new hw 160704 - + uint8_t index = 0; for (int i = 0; i < 40; i++) gasChangeListDepthGas20x2[i] = 0; SDiveState * pDiveState = &stateSim; copyDiveSettingsToSim(); + + /* activate deco calculation for all deco gases */ + for(index = 0; index < 1 + (2*NUM_GASES); index++) + { + if(pDiveState->diveSettings.gas[index].note.ub.deco) + { + pDiveState->diveSettings.gas[index].note.ub.decocalc = 1; + } + } + vpm_init(&pDiveState->vpm, pDiveState->diveSettings.vpm_conservatism, 0, 0); //buehlmann_init(); //timer_init();