Mercurial > public > ostc4
changeset 799:1e3c12d772eb
Added CO2 mirrow instance:
Using the CO2 mirror the co2 data may be displayed on one of the three O2 slots if a slot is not in used. The physical sensor can be found in the externalsensor map.
author | Ideenmodellierer |
---|---|
date | Mon, 07 Aug 2023 20:32:42 +0200 |
parents | e9eba334b942 |
children | f8a112c5e71d |
files | Common/Inc/data_central.h Discovery/Src/t7.c Discovery/Src/tMenuEditHardware.c |
diffstat | 3 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/Common/Inc/data_central.h Mon Aug 07 20:29:44 2023 +0200 +++ b/Common/Inc/data_central.h Mon Aug 07 20:32:42 2023 +0200 @@ -437,6 +437,7 @@ SENSOR_SENTINEL, SENSOR_TYPE_O2_END, SENSOR_CO2, + SENSOR_CO2M, SENSOR_MUX, SENSOR_END } externalInterfaceSensorType;
--- a/Discovery/Src/t7.c Mon Aug 07 20:29:44 2023 +0200 +++ b/Discovery/Src/t7.c Mon Aug 07 20:32:42 2023 +0200 @@ -3215,6 +3215,7 @@ text[textpointer++] = '\025'; /* red */ } snprintf(&text[textpointer],TEXTSIZE,"\%5ldppm", stateUsed->lifeData.CO2_data.CO2_ppm); + break; #endif case LLC_Compass: headerText[2] = TXT_2BYTE;
--- a/Discovery/Src/tMenuEditHardware.c Mon Aug 07 20:29:44 2023 +0200 +++ b/Discovery/Src/tMenuEditHardware.c Mon Aug 07 20:32:42 2023 +0200 @@ -441,6 +441,7 @@ for(index = 0; index < 3; index++) { + strSensorId[3] = TXT_2BYTE; strSensorId[4] = 'X'; strSensorId[5] = '1' + index; @@ -457,7 +458,8 @@ case SENSOR_DIGO2: case SENSOR_DIGO2M: strSensorId[4] = TXT2BYTE_O2IFDigital; break; - case SENSOR_CO2: strSensorId[3] = 'C'; + case SENSOR_CO2: + case SENSOR_CO2M: strSensorId[3] = 'C'; strSensorId[4] = 'O'; break; case SENSOR_SENTINEL: strSensorId[3] = 'S'; @@ -476,7 +478,7 @@ { snprintf(strSensorValue, 20,"%01.2f, %01.1f mV", pStateReal->lifeData.ppO2Sensor_bar[index], pStateReal->lifeData.sensorVoltage_mV[index]); } - else if(pSettings->ext_sensor_map[index] == SENSOR_CO2) + else if(pSettings->ext_sensor_map[index] == SENSOR_CO2M) { snprintf(strSensorValue, 20,"%ld ppm", pStateReal->lifeData.CO2_data.CO2_ppm); }