fix ac load state bug
This commit is contained in:
parent
62aa76b06a
commit
c56a98f823
|
@ -152,6 +152,10 @@ void ClimateCard::loadStateFromFRAM()
|
||||||
{
|
{
|
||||||
if (fram == nullptr)
|
if (fram == nullptr)
|
||||||
return;
|
return;
|
||||||
|
// Retrieve state from FRAM
|
||||||
|
state.ac_temperature = fram->read8(fram_address);
|
||||||
|
state.ac_mode = fram->read8(fram_address + 1);
|
||||||
|
state.ac_fan_speed = fram->read8(fram_address + 2);
|
||||||
if (state.ac_temperature > ac.max_temperature)
|
if (state.ac_temperature > ac.max_temperature)
|
||||||
state.ac_temperature = ac.max_temperature;
|
state.ac_temperature = ac.max_temperature;
|
||||||
else if (state.ac_temperature < ac.min_temperature)
|
else if (state.ac_temperature < ac.min_temperature)
|
||||||
|
|
Loading…
Reference in New Issue