diff Discovery/Src/tMenuEditPlanner.c @ 981:c6c781a2e85b default

Merge into default
author heinrichsweikamp
date Tue, 11 Feb 2025 18:12:00 +0100
parents 79b522fbabe6
children 7891160acde3
line wrap: on
line diff
--- a/Discovery/Src/tMenuEditPlanner.c	Tue Aug 13 13:24:54 2024 +0200
+++ b/Discovery/Src/tMenuEditPlanner.c	Tue Feb 11 18:12:00 2025 +0100
@@ -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);
 }
 
 
@@ -449,7 +450,11 @@
 
     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)
+#ifdef ENABLE_DECOCALC_OPTION
+        	|| (stateSimGetPointer()->diveSettings.gas[stateSimGetPointer()->diveSettings.decogaslist[i].GasIdInSettings].note.ub.decocalc == 0)
+#endif
+        )
                 break;
         depthChange = stateSimGetPointer()->diveSettings.decogaslist[i].change_during_ascent_depth_meter_otherwise_zero;
         if(depthPrev <= depthChange)
@@ -464,7 +469,11 @@
 
     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)
+#ifdef ENABLE_DECOCALC_OPTION
+            	|| (stateSimGetPointer()->diveSettings.gas[stateSimGetPointer()->diveSettings.decogaslist[i].GasIdInSettings].note.ub.decocalc == 0)
+#endif
+				)
                     break;
             depthChange = stateSimGetPointer()->diveSettings.decogaslist[i].change_during_ascent_depth_meter_otherwise_zero;
             if((depthChange < depthPrev) && (depthChange >= depthNext))