diff --git a/nspanel_esphome_addon_upload_tft.yaml b/nspanel_esphome_addon_upload_tft.yaml index f5b0ba6..e7b02bb 100644 --- a/nspanel_esphome_addon_upload_tft.yaml +++ b/nspanel_esphome_addon_upload_tft.yaml @@ -70,7 +70,7 @@ api: display: - id: !extend disp1 - #tft_url: ${nextion_update_url} + tft_url: ${nextion_update_url} script: - id: upload_tft_new #NOT IN USE FOR NOW @@ -440,7 +440,7 @@ script: // Tells the Nextion the content length of the tft file and baud rate it will be sent at // Once the Nextion accepts the command it will wait until the file is successfully uploaded // If it fails for any reason a power cycle of the display will be needed - sprintf(command, "whmi-wris %d,%d,1", content_length_, update_baud_rate_); + sprintf(command, "whmi-wris %d,%" PRIu32 ",1", content_length_, update_baud_rate_); // Clear serial receive buffer uint8_t d; @@ -483,7 +483,7 @@ script: if (transfer_buffer_ == nullptr) { ExternalRAMAllocator allocator(ExternalRAMAllocator::ALLOW_FAILURE); - ESP_LOGD(TAG, "Allocating buffer size %d, Heap size is %u", chunk_size, ESP.getFreeHeap()); + ESP_LOGD(TAG, "Allocating buffer size %d, Heap size is %" PRIu32, chunk_size, ESP.getFreeHeap()); transfer_buffer_ = allocator.allocate(chunk_size); if (transfer_buffer_ == nullptr) { // Try a smaller size ESP_LOGD(TAG, "Could not allocate buffer size: %d trying 4096 instead", chunk_size); @@ -500,7 +500,7 @@ script: transfer_buffer_size_ = chunk_size; } - ESP_LOGD(TAG, "Updating tft from \"%s\" with a file size of %d using %zu chunksize, Heap Size %d", + ESP_LOGD(TAG, "Updating tft from \"%s\" with a file size of %d using %zu chunksize, Heap Size %" PRIu32, url.c_str(), content_length_, transfer_buffer_size_, ESP.getFreeHeap()); int result = 0; @@ -511,7 +511,7 @@ script: return upload_end_(false); } App.feed_wdt(); - ESP_LOGD(TAG, "Heap Size %d, Bytes left %d", ESP.getFreeHeap(), content_length_); + ESP_LOGD(TAG, "Heap Size %" PRIu32 ", Bytes left %d", ESP.getFreeHeap(), content_length_); } is_updating_ = false; ESP_LOGD(TAG, "Successfully updated Nextion!"); @@ -597,7 +597,7 @@ script: result += static_cast(recv_string[j + 1]) << (8 * j); } if (result > 0) { - ESP_LOGI(TAG, "Nextion reported new range %d", result); + ESP_LOGI(TAG, "Nextion reported new range %" PRIu32, result); content_length_ = tft_size_ - result; // Deallocate the buffer when done delete[] buffer; @@ -733,7 +733,7 @@ script: return upload_end_(false); } - ESP_LOGD(TAG, "Updating tft from \"%s\" with a file size of %d, Heap Size %d", + ESP_LOGD(TAG, "Updating tft from \"%s\" with a file size of %d, Heap Size %" PRIu32, url.c_str(), content_length_, esp_get_free_heap_size()); ESP_LOGV(TAG, "Starting transfer by chunks loop"); @@ -746,7 +746,7 @@ script: return upload_end_(false); } App.feed_wdt(); - ESP_LOGV(TAG, "Heap Size %d, Bytes left %d", esp_get_free_heap_size(), content_length_); + ESP_LOGV(TAG, "Heap Size %" PRIu32 ", Bytes left %d", esp_get_free_heap_size(), content_length_); } is_updating_ = false;