Merge branch 'all-toggle-fix'
This commit is contained in:
commit
f249dfe314
1 changed files with 33 additions and 13 deletions
|
|
@ -1152,24 +1152,44 @@ bool ISEDisplay::calculateAllState()
|
|||
}
|
||||
void ISEDisplay::toggleSystem()
|
||||
{
|
||||
toggleLightGroupState();
|
||||
// check for ac lock and pm lock, if lock is on do nothing
|
||||
if (this->ac_lock_state == true)
|
||||
// toggleLightGroupState();
|
||||
// // check for ac lock and pm lock, if lock is on do nothing
|
||||
// if (this->ac_lock_state == true)
|
||||
// {
|
||||
// ESP_LOGI("ISEDisplay", "AC lock is on, do nothing");
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// toggleAC();
|
||||
// }
|
||||
// if (this->pm_lock_state == true)
|
||||
// {
|
||||
// ESP_LOGI("ISEDisplay", "PM lock is on, do nothing");
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// togglePM();
|
||||
// }
|
||||
|
||||
bool state = calculateAllState();
|
||||
if (state)
|
||||
{
|
||||
ESP_LOGI("ISEDisplay", "AC lock is on, do nothing");
|
||||
setACstate(0, ac_fan_speed, ac_temperature);
|
||||
setLightGroupState(0);
|
||||
setPMstate(false, pm_fan_speed);
|
||||
}
|
||||
else
|
||||
{
|
||||
toggleAC();
|
||||
}
|
||||
if (this->pm_lock_state == true)
|
||||
{
|
||||
ESP_LOGI("ISEDisplay", "PM lock is on, do nothing");
|
||||
}
|
||||
else
|
||||
{
|
||||
togglePM();
|
||||
setACstate(2, ac_fan_speed, ac_temperature);
|
||||
setLightGroupState(3);
|
||||
setPMstate(true, pm_fan_speed);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
void ISEDisplay::allToggleStandby()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue