diff Discovery/Src/data_central.c @ 788:4abfb8a2a435

Define explicit setpoints for low / high / deco. Add an option to delay the switch to SPlow until all decompression has been cleared. (mikeller)
author heinrichsweikamp
date Tue, 04 Jul 2023 14:39:06 +0200
parents 45b8f3c2acce
children dd7ce655db26
line wrap: on
line diff
--- a/Discovery/Src/data_central.c	Sun Jun 04 21:59:26 2023 +0200
+++ b/Discovery/Src/data_central.c	Tue Jul 04 14:39:06 2023 +0200
@@ -409,8 +409,6 @@
 }
 
 
-
-
 void updateSetpointStateUsed(void)
 {
 	if(!isLoopMode(stateUsed->diveSettings.diveMode))
@@ -470,6 +468,9 @@
 		}
 	}
 	setActualGas(lifeData, gasId, setpoint_cbar);
+
+    lifeData->setpointDecoActivated = false;
+    lifeData->setpointLowDelayed = false;
 }
 
 void setActualGasAir(SLifeData *lifeData)
@@ -875,3 +876,16 @@
 
     stateUsedWrite->diveSettings.compassHeading =  ((heading - 360) % 360) + 360;
 }
+
+
+const SDecoinfo *getDecoInfo(void)
+{
+    const SDecoinfo *decoInfo;
+    if (stateUsed->diveSettings.deco_type.ub.standard == GF_MODE) {
+        decoInfo = &stateUsed->decolistBuehlmann;
+    } else {
+        decoInfo = &stateUsed->decolistVPM;
+    }
+
+    return decoInfo;
+}