Mercurial > public > ostc4
diff Small_CPU/Src/externalInterface.c @ 1063:a3f42192da0f Icon_Integration
Always use polling mode for CO2 operation:
In the previous version the CO2 sensor was operated in streaming mode (2 measurements a second) in case it was used stand alone (without multiplexer). This added some complexity to the implementation (setup, error handling etc). To reduce this the sensor will now always be operated in polling mode like it is done for multiplexer operation. To make sure that the correct mode is set a command has been added to the configuration steps.
| author | Ideenmodellierer |
|---|---|
| date | Wed, 11 Feb 2026 18:35:44 +0100 |
| parents | 785772303f9c |
| children | 1f2067cad41b |
line wrap: on
line diff
--- a/Small_CPU/Src/externalInterface.c Tue Feb 10 19:36:05 2026 +0100 +++ b/Small_CPU/Src/externalInterface.c Wed Feb 11 18:35:44 2026 +0100 @@ -836,14 +836,7 @@ tmpSensorMap[EXT_INTERFACE_MUX_OFFSET] = SENSOR_CO2; externalInterface_SensorState[EXT_INTERFACE_MUX_OFFSET] = UART_COMMON_INIT; externalInterface_CheckBaudrate(SENSOR_CO2); - if(foundSensorMap[EXT_INTERFACE_SENSOR_CNT-1] == SENSOR_MUX) /* switch sensor operation mode depending on HW config */ - { - uartCo2_SendCmd(CO2CMD_MODE_POLL, cmdString, &cmdLength); - } - else - { - uartCo2_SendCmd(CO2CMD_MODE_STREAM, cmdString, &cmdLength); - } + uartCo2_SendCmd(CO2CMD_MODE_POLL, cmdString, &cmdLength); } break; case DETECTION_CO2_0:
