1
0
mirror of https://github.com/cmur2/python-bme680.git synced 2024-12-22 22:54:29 +01:00

Merge pull request #1 from davea/patch-1

Ensure set_gas_heater_temperature calls _set_regs with int
This commit is contained in:
Philip Howard 2017-10-18 13:38:12 +01:00 committed by GitHub
commit 88634926d7

View File

@ -182,7 +182,7 @@ class BME680(BME680Data):
raise ValueError("Profile '{}' should be between {} and {}".format(nb_profile, NBCONV_MIN, NBCONV_MAX)) raise ValueError("Profile '{}' should be between {} and {}".format(nb_profile, NBCONV_MIN, NBCONV_MAX))
self.gas_settings.heatr_temp = value self.gas_settings.heatr_temp = value
temp = self._calc_heater_resistance(self.gas_settings.heatr_temp) temp = int(self._calc_heater_resistance(self.gas_settings.heatr_temp))
self._set_regs(RES_HEAT0_ADDR + nb_profile, temp) self._set_regs(RES_HEAT0_ADDR + nb_profile, temp)
def set_gas_heater_duration(self, value, nb_profile=0): def set_gas_heater_duration(self, value, nb_profile=0):