mirror of
https://github.com/esphome/esphome.git
synced 2025-07-29 06:36:45 +00:00
[nextion] Remove upload flags reset from success path to prevent TFT corruption (#9064)
This commit is contained in:
parent
1f14c316a3
commit
2a629cae93
@ -337,6 +337,15 @@ bool Nextion::upload_tft(uint32_t baud_rate, bool exit_reparse) {
|
|||||||
|
|
||||||
bool Nextion::upload_end_(bool successful) {
|
bool Nextion::upload_end_(bool successful) {
|
||||||
ESP_LOGD(TAG, "TFT upload done: %s", YESNO(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->is_updating_ = false;
|
||||||
this->ignore_is_setup_ = 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_->set_baud_rate(this->original_baud_rate_);
|
||||||
this->parent_->load_settings();
|
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;
|
return successful;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -337,6 +337,14 @@ bool Nextion::upload_tft(uint32_t baud_rate, bool exit_reparse) {
|
|||||||
|
|
||||||
bool Nextion::upload_end_(bool successful) {
|
bool Nextion::upload_end_(bool successful) {
|
||||||
ESP_LOGD(TAG, "TFT upload done: %s", YESNO(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->is_updating_ = false;
|
||||||
this->ignore_is_setup_ = 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_->set_baud_rate(this->original_baud_rate_);
|
||||||
this->parent_->load_settings();
|
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;
|
return successful;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user