comparison Discovery/Src/tMenuEditHardware.c @ 724:f285424f04d9

Development feature: external pressure sensor It now possible to use ADC channel 2 as channel for external pressure data. This function may be activated by compile switch only. It is usefull for sensor verification, e.g. by using a small pressure chamber.
author Ideenmodellierer
date Thu, 05 Jan 2023 18:30:06 +0100
parents b9f699d2e3d0
children 9c65d226f4f6
comparison
equal deleted inserted replaced
723:9b9ed5459d57 724:f285424f04d9
566 { 566 {
567 if((pSettings->ppo2sensors_deactivated & (0x1 << loop)) == 0) 567 if((pSettings->ppo2sensors_deactivated & (0x1 << loop)) == 0)
568 { 568 {
569 if(pStateReal->lifeData.sensorVoltage_mV[loop] > 0.0001) /* sensor connected ?*/ 569 if(pStateReal->lifeData.sensorVoltage_mV[loop] > 0.0001) /* sensor connected ?*/
570 { 570 {
571 #ifdef ENABLE_EXTERNAL_PRESSURE
572 if(loop == 2)
573 {
574 compensatedRef = pStateReal->lifeData.pressure_ambient_bar;
575 }
576 #endif
577
571 pSettings->ppo2sensors_calibCoeff[loop] = compensatedRef / pStateReal->lifeData.sensorVoltage_mV[loop]; 578 pSettings->ppo2sensors_calibCoeff[loop] = compensatedRef / pStateReal->lifeData.sensorVoltage_mV[loop];
572 } 579 }
573 else 580 else
574 { 581 {
575 pSettings->ppo2sensors_calibCoeff[loop] = 0.0; 582 pSettings->ppo2sensors_calibCoeff[loop] = 0.0;