comparison Small_CPU/Src/externalInterface.c @ 956:083afabc6578 Evo_2_23

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.
author Ideenmodellierer
date Mon, 06 Jan 2025 17:55:34 +0100
parents effadaa3a1f7
children 3420e3ba698d
comparison
equal deleted inserted replaced
955:9b29995d6619 956:083afabc6578
1190 break; 1190 break;
1191 default: 1191 default:
1192 break; 1192 break;
1193 } 1193 }
1194 } 1194 }
1195 if((externalInterface_SensorState[activeSensorId] == UART_CO2_SETUP) /* timeout while setting up sensors */
1196 || (externalInterface_SensorState[activeSensorId] == UART_O2_CHECK))
1197 {
1198 forceMuxChannel = 1;
1199 }
1200
1195 1201
1196 if(pmap[EXT_INTERFACE_SENSOR_CNT-1] == SENSOR_MUX) /* select next sensor if mux is connected */ 1202 if(pmap[EXT_INTERFACE_SENSOR_CNT-1] == SENSOR_MUX) /* select next sensor if mux is connected */
1197 { 1203 {
1198 if(activeUartChannel < MAX_MUX_CHANNEL) 1204 if(activeUartChannel < MAX_MUX_CHANNEL)
1199 { 1205 {