Compare commits
No commits in common. "32c4af34f1ca02483fbb7e44716a20b40560a138" and "7bda72a930103fb333f375036f2db29768c16b58" have entirely different histories.
32c4af34f1
...
7bda72a930
1 changed files with 13 additions and 47 deletions
|
|
@ -535,13 +535,6 @@ void ISEDisplay::updatePMinside(u_int16_t pm25_inside)
|
||||||
|
|
||||||
void ISEDisplay::setPMstate(bool is_pm_on, uint8_t pm_fan_speed)
|
void ISEDisplay::setPMstate(bool is_pm_on, uint8_t pm_fan_speed)
|
||||||
{
|
{
|
||||||
//check pm_lock if true do nothing
|
|
||||||
this->pm_lock_state = strcmp(pm_lock->getValue(), "on") == 0;
|
|
||||||
if (this->pm_lock_state == true)
|
|
||||||
{
|
|
||||||
ESP_LOGI("ISEDisplay", "PM lock is on, do nothing");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
ESP_LOGI("ISEDisplay", "Setting PM state: %d, fan speed: %d", is_pm_on, pm_fan_speed);
|
ESP_LOGI("ISEDisplay", "Setting PM state: %d, fan speed: %d", is_pm_on, pm_fan_speed);
|
||||||
char buffer[4];
|
char buffer[4];
|
||||||
itoa(pm_fan_speed, buffer, DEC);
|
itoa(pm_fan_speed, buffer, DEC);
|
||||||
|
|
@ -569,13 +562,6 @@ void ISEDisplay::setACstate(uint8_t ac_fan_speed, uint8_t ac_mode, uint8_t ac_te
|
||||||
this->ac_fan_speed = ac_fan_speed;
|
this->ac_fan_speed = ac_fan_speed;
|
||||||
this->ac_mode = ac_mode;
|
this->ac_mode = ac_mode;
|
||||||
this->ac_temperature = ac_temperature;
|
this->ac_temperature = ac_temperature;
|
||||||
//check ac_lock if true do nothing
|
|
||||||
this->ac_lock_state = strcmp(ac_lock->getValue(), "on") == 0;
|
|
||||||
if (this->ac_lock_state == true)
|
|
||||||
{
|
|
||||||
ESP_LOGI("ISEDisplay", "AC lock is on, do nothing");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// check ac_temp is within bound of daikin
|
// check ac_temp is within bound of daikin
|
||||||
if (this->ac_temperature < DAIKIN_MIN_TEMP)
|
if (this->ac_temperature < DAIKIN_MIN_TEMP)
|
||||||
{
|
{
|
||||||
|
|
@ -1166,44 +1152,24 @@ 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)
|
|
||||||
{
|
{
|
||||||
setACstate(0, ac_fan_speed, ac_temperature);
|
ESP_LOGI("ISEDisplay", "AC lock is on, do nothing");
|
||||||
setLightGroupState(0);
|
|
||||||
setPMstate(false, pm_fan_speed);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setACstate(2, ac_fan_speed, ac_temperature);
|
toggleAC();
|
||||||
setLightGroupState(3);
|
}
|
||||||
setPMstate(true, pm_fan_speed);
|
if (this->pm_lock_state == true)
|
||||||
|
{
|
||||||
|
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