comfoair-esp32
comfoair-esp32 copied to clipboard
Wrong variable type (uint16) for pre_heater_temp_before and post_heater_temp_after
Today the temps dropped below zero and I noticed that one temp started showing wrong values. Since it was OK for T >0 I checked the code where it was declared as uint16
message.cpp, line 186:
LAZYSWITCH(220, "pre_heater_temp_before", "%.1f", uint16/10.0) // C°
LAZYSWITCH(221, "post_heater_temp_after", "%.1f", uint16/10.0) // C°
Changing it to int16 should solve the problem (I have to wait for tonight to confirm..)
LAZYSWITCH(220, "pre_heater_temp_before", "%.1f", int16/10.0) // C°
LAZYSWITCH(221, "post_heater_temp_after", "%.1f", int16/10.0) // C°
Can confirm the problem over here with negative temps
$ mosquitto_sub -t "comfoair/pre_heater_temp_before" -v
comfoair/pre_heater_temp_before 6552.6
rmot is probably also affected.
fixed in #46