Cleaning logs

This commit is contained in:
Edward Firmo
2024-03-09 13:51:33 +01:00
parent 03f5b74849
commit 78f5804730

View File

@@ -118,8 +118,7 @@ script:
baud_rate: uint32_t baud_rate: uint32_t
then: then:
- lambda: |- - lambda: |-
static const char *const TAG = "addon_upload_tft.script.nextion_upload"; ESP_LOGD("addon_upload_tft.script.nextion_upload", "Waiting for empty UART and Nextion queues");
ESP_LOGD(TAG, "Waiting for empty UART and Nextion queues");
- wait_until: - wait_until:
condition: condition:
- lambda: return (disp1->queue_size() < 1); - lambda: return (disp1->queue_size() < 1);
@@ -127,10 +126,9 @@ script:
timeout: 10s timeout: 10s
- delay: 2s - delay: 2s
- lambda: |- - lambda: |-
static const char *const TAG = "addon_upload_tft.script.nextion_upload"; ESP_LOGD("addon_upload_tft.script.nextion_upload", "Starting TFT upload...");
ESP_LOGD(TAG, "Starting TFT upload...");
id(tft_upload_result) = disp1->upload_tft(baud_rate, !disp1->is_setup()); id(tft_upload_result) = disp1->upload_tft(baud_rate, !disp1->is_setup());
ESP_LOGD(TAG, "TFT upload: %s", esphome::nextion::Nextion::tft_upload_result_to_string(id(tft_upload_result))); ESP_LOGD("addon_upload_tft.script.nextion_upload", "TFT upload: %s", esphome::nextion::Nextion::tft_upload_result_to_string(id(tft_upload_result)));
- id: open_upload_dialog - id: open_upload_dialog
mode: restart mode: restart
@@ -162,8 +160,7 @@ script:
message: string message: string
then: then:
- lambda: |- - lambda: |-
static const char *const TAG = "addon_upload_tft.script.report_upload_progress"; ESP_LOGD("addon_upload_tft.script.report_upload_progress", "%s", message.c_str());
ESP_LOGD(TAG, "%s", message.c_str());
if (id(tft_is_valid)) { if (id(tft_is_valid)) {
if (page_id->state != 26) { if (page_id->state != 26) {
open_upload_dialog->execute(); open_upload_dialog->execute();
@@ -193,7 +190,6 @@ script:
# Then start the upload # Then start the upload
- lambda: |- - lambda: |-
static const char *const TAG = "addon_upload_tft.script.upload_tft"; static const char *const TAG = "addon_upload_tft.script.upload_tft";
ESP_LOGD(TAG, "Starting...");
id(is_uploading_tft) = true; id(is_uploading_tft) = true;
@@ -303,11 +299,9 @@ script:
### This code should never run ### This code should never run
- delay: 2s - delay: 2s
- lambda: |- - lambda: |-
static const char *const TAG = "addon_upload_tft.script.upload_tft";
ESP_LOGD(TAG, "Finishing...");
id(is_uploading_tft) = false; id(is_uploading_tft) = false;
screen_power->publish_state(true); screen_power->publish_state(true);
ESP_LOGE(TAG, "TFT upload finished unsuccessfully!"); ESP_LOGE("addon_upload_tft.script.upload_tft", "TFT upload finished unsuccessfully!");
- id: upload_tft_sequence_attempt - id: upload_tft_sequence_attempt
mode: single mode: single