diff --git a/src/ise_display.cpp b/src/ise_display.cpp index 760fd47..f3b891b 100644 --- a/src/ise_display.cpp +++ b/src/ise_display.cpp @@ -22,7 +22,7 @@ void ISEDisplay::begin(DigitalInputCard *inputCard, DigitalOutputCard *outputCar auto bindedHandleTouch = std::bind(&ISEDisplay::handleTouch, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3); this->outputCallbackHandle = this->outputCard->registerChangeCallback(bindedHandlePWMChange); this->climateCallbackHandle = this->climateCard_daikin->registerChangeCallback(bindedHandleACChange); - this->user_mode = 1; // initialized to cool by default + this->user_mode = 2; // initialized to cool by default this->pm_fan_speed = 10; //remote_pm_fan_speed->setValue(pm_fan_speed); this->ac_fan_speed = 0; @@ -862,14 +862,6 @@ void ISEDisplay::updateuserACmode() switch (user_mode) { case 1: - this->displayAdapter->print("ac_mode.pic="); - this->displayAdapter->print(COMPONENT_AC_MODE_COOL_PIC); - this->sendStopBytes(); - this->displayAdapter->print("ac_mode.pic2="); - this->displayAdapter->print(COMPONENT_AC_MODE_COOL_PIC_PRESSED); - this->sendStopBytes(); - break; - case 2: this->displayAdapter->print("ac_mode.pic="); this->displayAdapter->print(COMPONENT_AC_MODE_FAN_PIC); this->sendStopBytes(); @@ -877,6 +869,14 @@ void ISEDisplay::updateuserACmode() this->displayAdapter->print(COMPONENT_AC_MODE_FAN_PIC_PRESSED); this->sendStopBytes(); break; + case 2: + this->displayAdapter->print("ac_mode.pic="); + this->displayAdapter->print(COMPONENT_AC_MODE_COOL_PIC); + this->sendStopBytes(); + this->displayAdapter->print("ac_mode.pic2="); + this->displayAdapter->print(COMPONENT_AC_MODE_COOL_PIC_PRESSED); + this->sendStopBytes(); + break; default: break; } diff --git a/src/main.cpp b/src/main.cpp index 85c1744..dd4a0ff 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -245,24 +245,23 @@ void loop() { espmega.loop(); iseDisplay.loop(); - - //loop set york ac state between 21 and 22 degree every 5 seconds - static uint32_t last_ac_update = 0; - if (millis() - last_ac_update > 5000) - { - uint8_t ac_temperature = climateCard_york.getTemperature(); - if (ac_temperature == 21) - { - ESP_LOGV("AC", "Setting AC temperature to 22"); - climateCard_york.setTemperature(22); - } - else - { - ESP_LOGV("AC", "Setting AC temperature to 21"); - climateCard_york.setTemperature(21); - } - last_ac_update = millis(); - } + // //loop set york ac state between 21 and 22 degree and mode to 1 every 5 seconds + // static uint32_t last_ac_update = 0; + // if (millis() - last_ac_update > 5000) + // { + // uint8_t ac_temperature = climateCard_york.getTemperature(); + // if (ac_temperature == 21) + // { + // ESP_LOGV("AC", "Setting AC temperature to 22"); + // climateCard_york.setState(2, 1, 22); + // } + // else + // { + // ESP_LOGV("AC", "Setting AC temperature to 21"); + // climateCard_york.setState(2, 1, 21); + // } + // last_ac_update = millis(); + // } // Update the time every 15 seconds