ac lock fix all system issue

This commit is contained in:
Siwat Sirichai 2024-03-24 16:01:56 +07:00
parent 1da05baad6
commit ef3f0558ed
2 changed files with 3 additions and 3 deletions

View File

@ -14,6 +14,6 @@ board = wt32-eth01
framework = arduino
lib_deps = siwats/ESPMegaPROR3@^2.4.3
monitor_speed = 115200
build_flags = -DCORE_DEBUG_LEVEL=5
build_flags = -DCORE_DEBUG_LEVEL=0
monitor_port = COM36
upload_port = COM36

View File

@ -920,7 +920,7 @@ void CUDDisplay::system_toggle()
this->cards.outputCard->setState(this->conf->air_purifier_pin, false);
if (this->cards.outputCard->getState(this->conf->mosquito_zapper_pin))
this->cards.outputCard->setState(this->conf->mosquito_zapper_pin, false);
if (!ac_lock.getIntValue() && this->cards.ac->getMode() != 0)
if (!get_ac_lock() && this->cards.ac->getMode() != 0)
this->cards.ac->setMode(0);
}
// If the system is off, turn lights, mosquito zapper, air purifier and AC on if they are off
@ -935,7 +935,7 @@ void CUDDisplay::system_toggle()
this->cards.outputCard->setState(this->conf->mosquito_zapper_pin, true);
if (!this->cards.outputCard->getState(this->conf->air_purifier_pin))
this->cards.outputCard->setState(this->conf->air_purifier_pin, true);
if (!ac_lock.getIntValue())
if (!get_ac_lock())
this->cards.ac->setMode(previous_mode);
}
}