diff Discovery/Src/tMenuEditPlanner.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 dd7ce655db26
children
line wrap: on
line diff
--- a/Discovery/Src/tMenuEditPlanner.c	Thu Nov 16 20:25:01 2023 +0100
+++ b/Discovery/Src/tMenuEditPlanner.c	Thu Nov 16 20:32:09 2023 +0100
@@ -449,7 +449,8 @@
 
     for(int i = 1; i < BUEHLMANN_STRUCT_MAX_GASES; i++)
     {
-        if(stateSimGetPointer()->diveSettings.decogaslist[i].change_during_ascent_depth_meter_otherwise_zero == 0)
+        if((stateSimGetPointer()->diveSettings.decogaslist[i].change_during_ascent_depth_meter_otherwise_zero == 0)
+        	|| (stateSimGetPointer()->diveSettings.gas[stateSimGetPointer()->diveSettings.decogaslist[i].GasIdInSettings].note.ub.decocalc == 0))
                 break;
         depthChange = stateSimGetPointer()->diveSettings.decogaslist[i].change_during_ascent_depth_meter_otherwise_zero;
         if(depthPrev <= depthChange)
@@ -464,7 +465,8 @@
 
     for(int i = GasIdPrev + 1; i < BUEHLMANN_STRUCT_MAX_GASES; i++)
     {
-            if(stateSimGetPointer()->diveSettings.decogaslist[i].change_during_ascent_depth_meter_otherwise_zero == 0)
+            if((stateSimGetPointer()->diveSettings.decogaslist[i].change_during_ascent_depth_meter_otherwise_zero == 0)
+            	|| (stateSimGetPointer()->diveSettings.gas[stateSimGetPointer()->diveSettings.decogaslist[i].GasIdInSettings].note.ub.decocalc == 0))
                     break;
             depthChange = stateSimGetPointer()->diveSettings.decogaslist[i].change_during_ascent_depth_meter_otherwise_zero;
             if((depthChange < depthPrev) && (depthChange >= depthNext))