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()
|
void ISEDisplay::toggleSystem()
|
||||||
{
|
{
|
||||||
toggleLightGroupState();
|
// toggleLightGroupState();
|
||||||
// check for ac lock and pm lock, if lock is on do nothing
|
// // check for ac lock and pm lock, if lock is on do nothing
|
||||||
if (this->ac_lock_state == true)
|
// 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
|
else
|
||||||
{
|
{
|
||||||
toggleAC();
|
setACstate(2, ac_fan_speed, ac_temperature);
|
||||||
}
|
setLightGroupState(3);
|
||||||
if (this->pm_lock_state == true)
|
setPMstate(true, pm_fan_speed);
|
||||||
{
|
|
||||||
ESP_LOGI("ISEDisplay", "PM lock is on, do nothing");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
togglePM();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
void ISEDisplay::allToggleStandby()
|
void ISEDisplay::allToggleStandby()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue