# HG changeset patch
# User Ideenmodellierer
# Date 1693162557 -7200
# Node ID e6827fcd760410be73be649e8f0c52517396472b
# Parent  9602a7338f28b09eed153ae75b468368fcf69ba0
Only jump to Sensor view during charging if sensors are connected:
In the past it could happen that the charger view was replaced by the sensor view which was not displaying values because no sensors were connected => no added value in performing the switch. In the new version the automatic jump to the sensor view will only be performed if sennsors are connected.

diff -r 9602a7338f28 -r e6827fcd7604 Discovery/Src/tHome.c
--- a/Discovery/Src/tHome.c	Sun Aug 27 20:51:13 2023 +0200
+++ b/Discovery/Src/tHome.c	Sun Aug 27 20:55:57 2023 +0200
@@ -648,13 +648,19 @@
         }
     }
 
-    if((stateUsed->mode == MODE_SURFACE) && (stateUsed->diveSettings.ppo2sensors_deactivated != 0x07) && (stateUsed->diveSettings.ccrOption != 0) && (!t7_customview_disabled(CVIEW_sensors)))
+    if((stateUsed->mode == MODE_SURFACE) && (!t7_customview_disabled(CVIEW_sensors)))
     {
     	tHome_tick_count_o2sens++;
     	if(tHome_tick_count_o2sens > AUTORETURN_O2SENS)
     	{
     		tHome_tick_count_o2sens = 0;
-    		t7_select_customview(CVIEW_sensors);
+    		if((stateUsed->chargeStatus == CHARGER_off)
+    			|| (stateUsed->lifeData.ppO2Sensor_bar[0] != 0.0)
+    			|| (stateUsed->lifeData.ppO2Sensor_bar[1] != 0.0)
+				|| (stateUsed->lifeData.ppO2Sensor_bar[2] != 0.0))
+			{
+    			t7_select_customview(CVIEW_sensors);
+			}
     	}
     }