# HG changeset patch # User Ideenmodellierer # Date 1725389202 -7200 # Node ID 07af9efd7c1344dbcf66ff7817c4e1dc764360fb # Parent 17f02ac9da67a64e74459e57b3b2d3622ca81f90 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. diff -r 17f02ac9da67 -r 07af9efd7c13 Discovery/Src/simulation.c --- 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(); diff -r 17f02ac9da67 -r 07af9efd7c13 Discovery/Src/tMenuEditPlanner.c --- a/Discovery/Src/tMenuEditPlanner.c Tue Sep 03 15:30:53 2024 +0200 +++ b/Discovery/Src/tMenuEditPlanner.c Tue Sep 03 20:46:42 2024 +0200 @@ -407,6 +407,7 @@ text[2] = 0; write_field_button(StMPLAN5_ExitResult, 30, 800, ME_Y_LINE6, &FontT48, text); setEvent(StMPLAN5_ExitResult, (uint32_t)OnAction_PlanResultExit); + tMenuEdit_select(StMPLAN5_ExitResult); }