always turn on to cool mode

This commit is contained in:
Siwat Sirichai 2024-05-17 21:17:06 +07:00
parent ec5c41561b
commit 426d0b8bb9
1 changed files with 3 additions and 3 deletions

View File

@ -398,8 +398,8 @@ void CUDDisplay::handle_touch(uint8_t page_id, uint8_t element_id, uint8_t touch
}
else
{
// If it is not, turn it on
this->cards.ac->setMode(previous_mode);
// If it is not, turn it on, always set the mode to cool when turning on
this->cards.ac->setMode(AC_MODE_COOL);
}
return;
}
@ -958,7 +958,7 @@ void CUDDisplay::system_toggle()
if (!this->cards.outputCard->getState(this->conf->air_purifier_pin))
this->cards.outputCard->setState(this->conf->air_purifier_pin, true);
if (!get_ac_lock())
this->cards.ac->setMode(previous_mode);
this->cards.ac->setMode(AC_MODE_COOL);
}
}