diff Discovery/Src/t7.c @ 577:9bb9a52d6ae5

Handle o2 voltage values < 0.5mV as invalid: Values < 0.5mv will now be handled as ppo2 = 0Bar to avaid problems (e.g. by negativ values) in the decompression calculation. In the custom display sensors with low voltage are show using '-'
author Ideenmodellierer
date Sun, 29 Nov 2020 22:58:11 +0100
parents 1c95f811967c
children 64bf41faab83
line wrap: on
line diff
--- a/Discovery/Src/t7.c	Sun Nov 29 22:55:31 2020 +0100
+++ b/Discovery/Src/t7.c	Sun Nov 29 22:58:11 2020 +0100
@@ -1662,6 +1662,13 @@
     selection_customview = *pViews;
 }
 
+void t7_select_customview(uint8_t selectedCustomview)
+{
+	if(selectedCustomview < CVIEW_END)
+	{
+		selection_customview = selectedCustomview;
+	}
+}
 
 uint8_t t7_get_length_of_customtext(void)
 {
@@ -1976,7 +1983,7 @@
         text[textpointer++] = '\030'; // main color
         for(int i=0;i<3;i++)
         {
-            if(stateUsed->diveSettings.ppo2sensors_deactivated & (1<<i))
+            if((stateUsed->diveSettings.ppo2sensors_deactivated & (1<<i)) || (stateUsed->lifeData.ppO2Sensor_bar[i] == 0.0))
             {
                 text[textpointer++] = '\031'; // labelcolor
                 text[textpointer++] = '\001';