Skip to content

Commit 4dd6d8e

Browse files
authored
Fix gas resistance reading
There is a report in the M5Stack community forum that ENVPro unit fails to report gas resistance. Apparently the returned number alwas is 0.0. So I looked into the source code and it looks like there might be a copy paste error here. Please note: I do not have the ENVPro unit myself so I cannot test this. It's just a hunch that this might be the issue.
1 parent d911d6f commit 4dd6d8e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

m5stack/libs/driver/bme68x.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@ def _read_field_data(self, index) -> BME68xData:
560560
if self._variant_id == 0x01:
561561
gas_resistance = self.calc_gas_resistance_high(adc_gas_res_high, gas_range_h)
562562
else:
563-
gas_resistance = self.calc_gas_resistance_high(adc_gas_res_low, gas_range_l)
563+
gas_resistance = self.calc_gas_resistance_low(adc_gas_res_low, gas_range_l)
564564

565565
self._sensor_data[0].status = status
566566
self._sensor_data[0].gas_index = gas_index

0 commit comments

Comments
 (0)