changeset 651:7b5a063f080f

Automatik setpoint change: Automatically switch setpoint in case the option is activated and the selected depth is passed
author Ideenmodellierer
date Mon, 19 Apr 2021 20:20:38 +0200
parents 5f0d3dce5ef4
children f6212495f34f
files Discovery/Src/base.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/Discovery/Src/base.c	Mon Apr 19 20:19:32 2021 +0200
+++ b/Discovery/Src/base.c	Mon Apr 19 20:20:38 2021 +0200
@@ -234,6 +234,7 @@
 #include "motion.h"
 #include "t7.h"
 #include "t3.h"
+#include "tMenuEditSetpoint.h"
 
 #ifdef DEMOMODE
 #include "demo.h"
@@ -1566,6 +1567,11 @@
     if((stateUsed->mode != MODE_DIVE) || (stateUsed->diveSettings.diveMode == DIVEMODE_Apnea) || (stateUsed->diveSettings.diveMode == DIVEMODE_Gauge) || (decoLock != DECO_CALC_ready ))
         return;
 
+    if((stateUsed->warnings.betterSetpoint) && (settingsGetPointer()->autoSetpoint) && (settingsGetPointer()->CCR_Mode == CCRMODE_FixedSetpoint))
+   	{
+    	openEdit_DiveSelectBetterSetpoint();
+   	}
+
     decoLock = DECO_CALC_running;
 
     if(stateDeco.diveSettings.deco_type.ub.standard == GF_MODE)