diff Discovery/Src/base.c @ 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 c737cf5d9067
children 1b995079c045
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)