Mercurial > public > ostc4
comparison Discovery/Src/tMenuEditHardware.c @ 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 | acf6614dc396 |
children | 26ae9e8f24fd |
comparison
equal
deleted
inserted
replaced
798:e9eba334b942 | 799:1e3c12d772eb |
---|---|
439 strSensorId[5] = '1'; | 439 strSensorId[5] = '1'; |
440 strSensorId[6] = 0; | 440 strSensorId[6] = 0; |
441 | 441 |
442 for(index = 0; index < 3; index++) | 442 for(index = 0; index < 3; index++) |
443 { | 443 { |
444 strSensorId[3] = TXT_2BYTE; | |
444 strSensorId[4] = 'X'; | 445 strSensorId[4] = 'X'; |
445 strSensorId[5] = '1' + index; | 446 strSensorId[5] = '1' + index; |
446 | 447 |
447 switch(pSettings->ext_sensor_map[index]) | 448 switch(pSettings->ext_sensor_map[index]) |
448 { | 449 { |
455 case SENSOR_ANALOG: strSensorId[4] = TXT2BYTE_O2IFAnalog; | 456 case SENSOR_ANALOG: strSensorId[4] = TXT2BYTE_O2IFAnalog; |
456 break; | 457 break; |
457 case SENSOR_DIGO2: | 458 case SENSOR_DIGO2: |
458 case SENSOR_DIGO2M: strSensorId[4] = TXT2BYTE_O2IFDigital; | 459 case SENSOR_DIGO2M: strSensorId[4] = TXT2BYTE_O2IFDigital; |
459 break; | 460 break; |
460 case SENSOR_CO2: strSensorId[3] = 'C'; | 461 case SENSOR_CO2: |
462 case SENSOR_CO2M: strSensorId[3] = 'C'; | |
461 strSensorId[4] = 'O'; | 463 strSensorId[4] = 'O'; |
462 break; | 464 break; |
463 case SENSOR_SENTINEL: strSensorId[3] = 'S'; | 465 case SENSOR_SENTINEL: strSensorId[3] = 'S'; |
464 strSensorId[4] = 'e'; | 466 strSensorId[4] = 'e'; |
465 break; | 467 break; |
474 strSensorValue[0] = 0; | 476 strSensorValue[0] = 0; |
475 if((pSettings->ext_sensor_map[index] >= SENSOR_OPTIC) && (pSettings->ext_sensor_map[index] < SENSOR_TYPE_O2_END)) | 477 if((pSettings->ext_sensor_map[index] >= SENSOR_OPTIC) && (pSettings->ext_sensor_map[index] < SENSOR_TYPE_O2_END)) |
476 { | 478 { |
477 snprintf(strSensorValue, 20,"%01.2f, %01.1f mV", pStateReal->lifeData.ppO2Sensor_bar[index], pStateReal->lifeData.sensorVoltage_mV[index]); | 479 snprintf(strSensorValue, 20,"%01.2f, %01.1f mV", pStateReal->lifeData.ppO2Sensor_bar[index], pStateReal->lifeData.sensorVoltage_mV[index]); |
478 } | 480 } |
479 else if(pSettings->ext_sensor_map[index] == SENSOR_CO2) | 481 else if(pSettings->ext_sensor_map[index] == SENSOR_CO2M) |
480 { | 482 { |
481 snprintf(strSensorValue, 20,"%ld ppm", pStateReal->lifeData.CO2_data.CO2_ppm); | 483 snprintf(strSensorValue, 20,"%ld ppm", pStateReal->lifeData.CO2_data.CO2_ppm); |
482 } | 484 } |
483 y_line = ME_Y_LINE1 + (index * ME_Y_LINE_STEP); | 485 y_line = ME_Y_LINE1 + (index * ME_Y_LINE_STEP); |
484 if(strSensorValue[0] != 0) | 486 if(strSensorValue[0] != 0) |