pvvx / ATC_MiThermometer

Custom firmware for the Xiaomi Thermometers and Telink Flasher
https://github.com/pvvx/pvvx.github.io/tree/master/ATC_MiThermometer
Other
2.75k stars 196 forks source link

Incorrect Fahrenheit calculation in ≥4.5 #406

Closed thedanbob closed 7 months ago

thedanbob commented 7 months ago

After updating to v4.5 I noticed that the calculation for °F is incorrect. For example, one sensor I have is currently reporting 22.16°C (71.89°F) but it is displaying 36.0°F. Same behavior in v4.6 but v4.4 is correct.

I'm guessing the bug was introduced here but I'm not certain: https://github.com/pvvx/ATC_MiThermometer/commit/9d8caf7e35b05e3a8564b3ebf2e5f7e99682509b#diff-6184566596a46e0fc3c56159deebe6cb070d3a65dd5ef3ba7342d0945c498677

Edit: figured it out and made a PR: https://github.com/pvvx/ATC_MiThermometer/pull/407

cmptrphreak commented 7 months ago

I encountered the same on 4.5. its 363F in my office now.

Jefrysuko commented 7 months ago

Same here. 22.45°C is converting to 361°F

thedanbob commented 7 months ago

Confirming this is fixed in the updated v4.6.