mirror of
https://github.com/esphome/esphome.git
synced 2025-09-02 19:32:19 +01:00
[nextion] Remove upload flags reset from success path to prevent TFT corruption (#9064)
This commit is contained in:
@@ -337,6 +337,15 @@ bool Nextion::upload_tft(uint32_t baud_rate, bool exit_reparse) {
|
||||
|
||||
bool Nextion::upload_end_(bool successful) {
|
||||
ESP_LOGD(TAG, "TFT upload done: %s", YESNO(successful));
|
||||
|
||||
if (successful) {
|
||||
ESP_LOGD(TAG, "Restart");
|
||||
delay(1500); // NOLINT
|
||||
App.safe_reboot();
|
||||
delay(1500); // NOLINT
|
||||
} else {
|
||||
ESP_LOGE(TAG, "TFT upload failed");
|
||||
|
||||
this->is_updating_ = false;
|
||||
this->ignore_is_setup_ = false;
|
||||
|
||||
@@ -346,14 +355,8 @@ bool Nextion::upload_end_(bool successful) {
|
||||
this->parent_->set_baud_rate(this->original_baud_rate_);
|
||||
this->parent_->load_settings();
|
||||
}
|
||||
|
||||
if (successful) {
|
||||
ESP_LOGD(TAG, "Restart");
|
||||
delay(1500); // NOLINT
|
||||
App.safe_reboot();
|
||||
} else {
|
||||
ESP_LOGE(TAG, "TFT upload failed");
|
||||
}
|
||||
|
||||
return successful;
|
||||
}
|
||||
|
||||
|
@@ -337,6 +337,14 @@ bool Nextion::upload_tft(uint32_t baud_rate, bool exit_reparse) {
|
||||
|
||||
bool Nextion::upload_end_(bool successful) {
|
||||
ESP_LOGD(TAG, "TFT upload done: %s", YESNO(successful));
|
||||
|
||||
if (successful) {
|
||||
ESP_LOGD(TAG, "Restart");
|
||||
delay(1500); // NOLINT
|
||||
App.safe_reboot();
|
||||
} else {
|
||||
ESP_LOGE(TAG, "TFT upload failed");
|
||||
|
||||
this->is_updating_ = false;
|
||||
this->ignore_is_setup_ = false;
|
||||
|
||||
@@ -346,14 +354,8 @@ bool Nextion::upload_end_(bool successful) {
|
||||
this->parent_->set_baud_rate(this->original_baud_rate_);
|
||||
this->parent_->load_settings();
|
||||
}
|
||||
|
||||
if (successful) {
|
||||
ESP_LOGD(TAG, "Restart");
|
||||
delay(1500); // NOLINT
|
||||
App.safe_reboot();
|
||||
} else {
|
||||
ESP_LOGE(TAG, "TFT upload failed");
|
||||
}
|
||||
|
||||
return successful;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user