diff --git a/lark1fq/src/ltc2640.c b/lark1fq/src/ltc2640.c index 6141e77..1a9c629 100755 --- a/lark1fq/src/ltc2640.c +++ b/lark1fq/src/ltc2640.c @@ -66,19 +66,14 @@ void ltc2640_data_init(void) int32_t ltc2640_data_process(void) { uint8_t ch = 2; - uint32_t sig_ref; int32_t reading; if (flag.filter_climb > 0) { return VOLTAGE_400MV; } - sig_ref = device_data.gas_sig[ch]; - if (sig_ref < data_ltc2640.sig_low || sig_ref > data_ltc2640.sig_high) { - return VOLTAGE_200MV; - } - sig_ref = device_data.gas_sig[data_gas_info.ref[ch]]; - if (sig_ref < data_ltc2640.ref_low || sig_ref > data_ltc2640.ref_high) { + if ((device_data.detector_temperature < data_ltc2640.temperature_low) || \ + (device_data.detector_temperature > data_ltc2640.temperature_high)) { return VOLTAGE_200MV; }