add display delay
This commit is contained in:
parent
245709870b
commit
f0a9c4f1d0
|
@ -14,6 +14,6 @@ board = wt32-eth01
|
||||||
framework = arduino
|
framework = arduino
|
||||||
lib_deps = siwats/ESPMegaPROR3@^2.4.3
|
lib_deps = siwats/ESPMegaPROR3@^2.4.3
|
||||||
monitor_speed = 115200
|
monitor_speed = 115200
|
||||||
build_flags = -DCORE_DEBUG_LEVEL=5
|
build_flags = -DCORE_DEBUG_LEVEL=0
|
||||||
monitor_port = COM36
|
monitor_port = COM36
|
||||||
upload_port = COM36
|
upload_port = COM36
|
|
@ -177,6 +177,7 @@ void CUDDisplay::display_init()
|
||||||
// Perform a reset on the display
|
// Perform a reset on the display
|
||||||
ESP_LOGV("CUD Display", "Resetting display");
|
ESP_LOGV("CUD Display", "Resetting display");
|
||||||
this->reset();
|
this->reset();
|
||||||
|
vTaskDelay(1000 / portTICK_PERIOD_MS);
|
||||||
// Set the display to the main screen
|
// Set the display to the main screen
|
||||||
ESP_LOGV("CUD Display", "Setting display to main screen");
|
ESP_LOGV("CUD Display", "Setting display to main screen");
|
||||||
this->jumpToPage(LCD_PAGE_ID_DASHBOARD);
|
this->jumpToPage(LCD_PAGE_ID_DASHBOARD);
|
||||||
|
@ -424,7 +425,7 @@ void CUDDisplay::handle_touch(uint8_t page_id, uint8_t element_id, uint8_t touch
|
||||||
last_ac_button_press = millis();
|
last_ac_button_press = millis();
|
||||||
// Send the new temperature to the Display
|
// Send the new temperature to the Display
|
||||||
this->takeSerialMutex();
|
this->takeSerialMutex();
|
||||||
this->displayAdapter->printf("%s.txt=%d", LCD_DASHBOARD_ELEMENT_NAME_AC_TEMPERATURE, newTemp);
|
this->displayAdapter->printf("%s.txt=\"%d\"", LCD_DASHBOARD_ELEMENT_NAME_AC_TEMPERATURE, newTemp);
|
||||||
this->sendStopBytes();
|
this->sendStopBytes();
|
||||||
this->giveSerialMutex();
|
this->giveSerialMutex();
|
||||||
return;
|
return;
|
||||||
|
@ -441,6 +442,7 @@ void CUDDisplay::handle_touch(uint8_t page_id, uint8_t element_id, uint8_t touch
|
||||||
// If the button press is pending, use the pending temperature as base
|
// If the button press is pending, use the pending temperature as base
|
||||||
newTemp = this->pending_temperature;
|
newTemp = this->pending_temperature;
|
||||||
}
|
}
|
||||||
|
newTemp--;
|
||||||
// Does the temperature exceed the lower bound?, if it does, bound it
|
// Does the temperature exceed the lower bound?, if it does, bound it
|
||||||
ESP_LOGD("CUD Display", "Requested Temp: %d, Lower Bound: %d", newTemp, this->ac_temp_lower_bound.getIntValue());
|
ESP_LOGD("CUD Display", "Requested Temp: %d, Lower Bound: %d", newTemp, this->ac_temp_lower_bound.getIntValue());
|
||||||
if (newTemp < this->ac_temp_lower_bound.getIntValue())
|
if (newTemp < this->ac_temp_lower_bound.getIntValue())
|
||||||
|
@ -454,7 +456,7 @@ void CUDDisplay::handle_touch(uint8_t page_id, uint8_t element_id, uint8_t touch
|
||||||
last_ac_button_press = millis();
|
last_ac_button_press = millis();
|
||||||
// Send the new temperature to the Display
|
// Send the new temperature to the Display
|
||||||
this->takeSerialMutex();
|
this->takeSerialMutex();
|
||||||
this->displayAdapter->printf("%s.txt=%d", LCD_DASHBOARD_ELEMENT_NAME_AC_TEMPERATURE, newTemp);
|
this->displayAdapter->printf("%s.txt=\"%d\"", LCD_DASHBOARD_ELEMENT_NAME_AC_TEMPERATURE, newTemp);
|
||||||
this->sendStopBytes();
|
this->sendStopBytes();
|
||||||
this->giveSerialMutex();
|
this->giveSerialMutex();
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue