comment our remote var
This commit is contained in:
parent
733ed54f9b
commit
c99348bb72
3 changed files with 60 additions and 53 deletions
|
|
@ -12,7 +12,7 @@ void ISEDisplay::begin(DigitalInputCard *inputCard, DigitalOutputCard *outputCar
|
|||
this->outputCard = outputCard;
|
||||
this->climateCard = climateCard;
|
||||
auto bindedHandlePWMChange = std::bind(&ISEDisplay::handlePWMChange, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3);
|
||||
auto bindedHandleACChange = std::bind(&ISEDisplay::setACstate, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3);
|
||||
auto bindedHandleACChange = std::bind(&ISEDisplay::handleACChange, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3);
|
||||
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->registerChangeCallback(bindedHandleACChange);
|
||||
|
|
@ -43,9 +43,9 @@ void ISEDisplay::begin(DigitalInputCard *inputCard, DigitalOutputCard *outputCar
|
|||
this->outputCard->setValue(2,0);
|
||||
this->outputCard->setValue(3,0);
|
||||
this->outputCard->setValue(4,0);
|
||||
// this->climateCard->setTemperature(ac_temperature);
|
||||
// this->climateCard->setFanSpeed(ac_fan_speed);
|
||||
// this->climateCard->setMode(ac_mode);
|
||||
this->climateCard->setTemperature(ac_temperature);
|
||||
this->climateCard->setFanSpeed(ac_fan_speed);
|
||||
this->climateCard->setMode(ac_mode);
|
||||
}
|
||||
void ISEDisplay::loop()
|
||||
{
|
||||
|
|
@ -64,7 +64,6 @@ void ISEDisplay::loop()
|
|||
this->jumpToPage(1);
|
||||
ESP_LOGI("ISEDisplay", "Jumping to standby page");
|
||||
}
|
||||
ESP_LOGI("ISEDisplay", "No activity for 2 minutes & currently at standby page");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -82,6 +81,7 @@ void ISEDisplay::handleTouch(uint8_t page, uint8_t component, uint8_t touch_type
|
|||
// TODO : Should you really jump to page 2 here? should't page jumping be handled reactivly?
|
||||
// EX. if atleast one light is on, then jump to active page, else jump to standby page
|
||||
// This will allow page to change correctly when the system is started and when controlled remotely which won't call handleTouch
|
||||
time_since_last_screen_update = millis();
|
||||
this->jumpToPage(2);
|
||||
// the function of the button is to open the dashboard from standby
|
||||
break;
|
||||
|
|
@ -130,6 +130,7 @@ void ISEDisplay::handleTouch(uint8_t page, uint8_t component, uint8_t touch_type
|
|||
{
|
||||
setLightLevel(i, 1);
|
||||
}
|
||||
updateLightGroupStatePageDashboard();
|
||||
break;
|
||||
case COMPONENT_LIGHT_MASTER_LEVEL2_TOUCHPOINT:
|
||||
if (touch_type != TOUCH_TYPE_RELEASE)
|
||||
|
|
@ -138,6 +139,7 @@ void ISEDisplay::handleTouch(uint8_t page, uint8_t component, uint8_t touch_type
|
|||
{
|
||||
setLightLevel(i, 2);
|
||||
}
|
||||
updateLightGroupStatePageDashboard();
|
||||
break;
|
||||
case COMPONENT_LIGHT_MASTER_LEVEL3_TOUCHPOINT:
|
||||
if (touch_type != TOUCH_TYPE_RELEASE)
|
||||
|
|
@ -146,6 +148,7 @@ void ISEDisplay::handleTouch(uint8_t page, uint8_t component, uint8_t touch_type
|
|||
{
|
||||
setLightLevel(i, 3);
|
||||
}
|
||||
updateLightGroupStatePageDashboard();
|
||||
break;
|
||||
case COMPONENT_LIGHT_ROW1_SLIDER:
|
||||
if (touch_type != TOUCH_TYPE_RELEASE)
|
||||
|
|
@ -517,7 +520,6 @@ void ISEDisplay::setLightLevel(uint8_t row, uint8_t level)
|
|||
if (row == i)
|
||||
this->outputCard->setValue(row, level);
|
||||
}
|
||||
updateLightGroupStatePageDashboard();
|
||||
}
|
||||
|
||||
void ISEDisplay::updateLightGroupStatePageStandby()
|
||||
|
|
@ -621,7 +623,6 @@ void ISEDisplay::toggleLightIndividual(uint8_t row)
|
|||
// Set the state
|
||||
setLightLevel(row, state);
|
||||
updateLightGroupStatePageDashboard();
|
||||
updateLightGroupStatePageStandby();
|
||||
}
|
||||
void ISEDisplay::toggleSliderLight(uint8_t row, uint8_t lightLevel)
|
||||
{
|
||||
|
|
@ -650,6 +651,7 @@ void ISEDisplay::toggleSliderLight(uint8_t row, uint8_t lightLevel)
|
|||
}
|
||||
// Set the state
|
||||
setLightLevel(row, state);
|
||||
updateLightGroupStatePageDashboard();
|
||||
}
|
||||
void ISEDisplay::updateAirPurifierStateStandby()
|
||||
{
|
||||
|
|
@ -696,12 +698,16 @@ void ISEDisplay::updateAirPurifierState()
|
|||
|
||||
this->giveSerialMutex();
|
||||
}
|
||||
void ISEDisplay::handleACChange(uint8_t mode, uint8_t fan_speed, uint8_t temperature)
|
||||
{
|
||||
updateACState();
|
||||
}
|
||||
void ISEDisplay::updateuserACmode()
|
||||
{
|
||||
this->takeSerialMutex();
|
||||
switch (user_mode)
|
||||
{
|
||||
case 1:
|
||||
case 1:
|
||||
this->displayAdapter->print("ac_mode.pic=");
|
||||
this->displayAdapter->print(COMPONENT_AC_MODE_COOL_PIC);
|
||||
this->sendStopBytes();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue