From cf8609f070eb4f418d1f89d695710f535a699cba Mon Sep 17 00:00:00 2001 From: Edward Firmo <94725493+edwardtfn@users.noreply.github.com> Date: Thu, 2 May 2024 15:51:01 +0200 Subject: [PATCH] Fix typo in types --- esphome/components/nextion/nextion.h | 4 ++-- esphome/components/nextion/nextion_upload.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/esphome/components/nextion/nextion.h b/esphome/components/nextion/nextion.h index 2b0d6461d..17a17715f 100644 --- a/esphome/components/nextion/nextion.h +++ b/esphome/components/nextion/nextion.h @@ -1237,14 +1237,14 @@ class Nextion : public NextionBase, public PollingComponent, public uart::UARTDe * * @param http_client A reference to the HTTP client object. The exact type of this object * depends on the platform: - * - Arduino: HttpClient type from the ArduinoHttpClient library. + * - Arduino: HTTPClient type from the ArduinoHttpClient library. * - ESP-IDF: esp_http_client_handle_t from the ESP HTTP Client library. * * @note Ensure that the HTTP client is initialized and not NULL before calling this function * to avoid runtime errors. */ #ifdef ARDUINO - void close_http_client_(HttpClient &http_client); + void close_http_client_(HTTPClient &http_client); #else // ESP-IDF void close_http_client_(esp_http_client_handle_t http_client); #endif // ARDUINO vs ESP-IDF diff --git a/esphome/components/nextion/nextion_upload.cpp b/esphome/components/nextion/nextion_upload.cpp index ba3aea607..40b8aea23 100644 --- a/esphome/components/nextion/nextion_upload.cpp +++ b/esphome/components/nextion/nextion_upload.cpp @@ -317,7 +317,7 @@ bool Nextion::upload_tft(uint32_t baud_rate, bool exit_reparse) { } #ifdef ARDUINO - std::string content_range_string = http_client.header("Content-Range"); + String content_range_string = http_client.header("Content-Range"); content_range_string.remove(0, 12); this->tft_size_ = content_range_string.toInt(); #else // ESP-IDF @@ -424,7 +424,7 @@ bool Nextion::upload_tft(uint32_t baud_rate, bool exit_reparse) { } #ifdef ARDUINO -void Nextion::close_http_client_(HttpClient &http_client) { +void Nextion::close_http_client_(HTTPClient &http_client) { ESP_LOGD(TAG, "Close HTTP connection"); http_client.end(); ESP_LOGV(TAG, "Connection closed");