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

Merge branch 'patch-1' of git://github.com/melvinmajor/bme680-python into melvinmajor-patch-1

This commit is contained in:
Phil Howard 2020-11-02 15:57:28 +00:00
commit adfd58db6b

View File

@ -32,7 +32,7 @@ sensor.set_filter(bme680.FILTER_SIZE_3)
def get_cpu_temperature():
process = Popen(['vcgencmd', 'measure_temp'], stdout=PIPE)
output, _error = process.communicate()
return float(output[output.index('=') + 1:output.rindex("'")])
return float(output[output.index(ord('=')) + 1:output.rindex(ord("'"))])
factor = 1.0 # Smaller numbers adjust temp down, vice versa