# HG changeset patch
# User Ideenmodellierer
# Date 1736182534 -3600
# Node ID 083afabc6578ac4e989db3a2bff50dadc0be7fd5
# Parent  9b29995d66193830643b30ad455af98f5ef4b30b
Bugfix UART sensor MUX channel selection after sleep:
In case only one UART sensor is connected to the MUX, to a channel other than 0 then the sensor operation could fail in case the initial mux address selection was not successfull. To fix this problem the MUX address is selected again in case a timeout occures during sensor setup.

diff -r 9b29995d6619 -r 083afabc6578 Small_CPU/Src/externalInterface.c
--- a/Small_CPU/Src/externalInterface.c	Wed Jan 01 20:37:17 2025 +0100
+++ b/Small_CPU/Src/externalInterface.c	Mon Jan 06 17:55:34 2025 +0100
@@ -1192,6 +1192,12 @@
 						break;
 				}
 			}
+			if((externalInterface_SensorState[activeSensorId] == UART_CO2_SETUP)	/* timeout while setting up sensors */
+					|| (externalInterface_SensorState[activeSensorId] == UART_O2_CHECK))
+			{
+				forceMuxChannel = 1;
+			}
+
 
 			if(pmap[EXT_INTERFACE_SENSOR_CNT-1] == SENSOR_MUX) /* select next sensor if mux is connected */
 			{