Negative Temperatures
Closed this issue · 1 comments
in igrill.py the 2 byte temperature value becomes T + 65536 when temperature is negative.
this fixed it for my iGrill v2:
for probe_num, temp_char in list(self.temp_chars.items()):
temp = bytearray(temp_char.read())[1] * 256
temp += bytearray(temp_char.read())[0]
#temps[probe_num] = float(temp) if float(temp) != 63536.0 else empty
temps[probe_num] = float(temp) if float(temp) < 32768.0 else float(temp) - 65536.0
cheers
Recherchen
and of course many thanks for this nice implementation!!
Hi
Thank you for reporting this.
I have not tested with negative temperatures before, so I was not aware,
If you would like, you can make a PR, if not, I will see if I can implement this the next time I'm doing some active development on this project.