From 426d0b8bb985770ad3d7f5fe1af11651aedd06f1 Mon Sep 17 00:00:00 2001 From: Siwat Sirichai Date: Fri, 17 May 2024 21:17:06 +0700 Subject: [PATCH] always turn on to cool mode --- src/display.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/display.cpp b/src/display.cpp index 0d2305c..a17391d 100644 --- a/src/display.cpp +++ b/src/display.cpp @@ -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); } }