Update espmega_iot_core.cpp

This commit is contained in:
Siwat Sirichai 2023-10-02 18:47:51 +07:00
parent 98ea13a3dd
commit 7ebc091691
1 changed files with 4 additions and 4 deletions

View File

@ -699,10 +699,10 @@ void ac_set_state(int mode, int temperature, int fan_speed)
{ {
ac_mode = mode; ac_mode = mode;
ac_temperature = temperature; ac_temperature = temperature;
if (ac_temperature<AC_MIN_TEMPERATURE) if (ac_temperature < AC_MIN_TEMPERATURE)
ac_temperature = AC_MIN_TEMPERATURE; ac_temperature = AC_MIN_TEMPERATURE;
else if(ac_temperature >AC_MAX_TEMPERATURE) else if (ac_temperature > AC_MAX_TEMPERATURE)
ac_temperature=AC_MAX_TEMPERATURE; ac_temperature = AC_MAX_TEMPERATURE;
ac_fan_speed = fan_speed; ac_fan_speed = fan_speed;
temperature -= AC_MIN_TEMPERATURE; temperature -= AC_MIN_TEMPERATURE;