[nextion] Replace flags to USE_ARDUINO (#6700)

This commit is contained in:
Edward Firmo 2024-05-08 21:05:24 +02:00 committed by Jesse Hills
parent 054587c0e4
commit 34585a6f15
No known key found for this signature in database
GPG key ID: BEAAE804EFD8E83A
2 changed files with 7 additions and 7 deletions

View file

@ -12,7 +12,7 @@
#include "esphome/components/display/display_color_utils.h" #include "esphome/components/display/display_color_utils.h"
#ifdef USE_NEXTION_TFT_UPLOAD #ifdef USE_NEXTION_TFT_UPLOAD
#ifdef ARDUINO #ifdef USE_ARDUINO
#ifdef USE_ESP32 #ifdef USE_ESP32
#include <HTTPClient.h> #include <HTTPClient.h>
#endif // USE_ESP32 #endif // USE_ESP32
@ -22,7 +22,7 @@
#endif // USE_ESP8266 #endif // USE_ESP8266
#elif defined(USE_ESP_IDF) #elif defined(USE_ESP_IDF)
#include <esp_http_client.h> #include <esp_http_client.h>
#endif // ARDUINO vs ESP-IDF #endif // ARDUINO vs USE_ESP_IDF
#endif // USE_NEXTION_TFT_UPLOAD #endif // USE_NEXTION_TFT_UPLOAD
namespace esphome { namespace esphome {
@ -987,7 +987,7 @@ class Nextion : public NextionBase, public PollingComponent, public uart::UARTDe
#ifdef USE_NEXTION_TFT_UPLOAD #ifdef USE_NEXTION_TFT_UPLOAD
/** /**
* Set the tft file URL. https seems problematic with arduino.. * Set the tft file URL. https seems problematic with Arduino..
*/ */
void set_tft_url(const std::string &tft_url) { this->tft_url_ = tft_url; } void set_tft_url(const std::string &tft_url) { this->tft_url_ = tft_url; }
@ -1190,7 +1190,7 @@ class Nextion : public NextionBase, public PollingComponent, public uart::UARTDe
uint32_t original_baud_rate_ = 0; uint32_t original_baud_rate_ = 0;
bool upload_first_chunk_sent_ = false; bool upload_first_chunk_sent_ = false;
#ifdef ARDUINO #ifdef USE_ARDUINO
/** /**
* will request chunk_size chunks from the web server * will request chunk_size chunks from the web server
* and send each to the nextion * and send each to the nextion
@ -1208,7 +1208,7 @@ class Nextion : public NextionBase, public PollingComponent, public uart::UARTDe
* @return position of last byte transferred, -1 for failure. * @return position of last byte transferred, -1 for failure.
*/ */
int upload_by_chunks_(esp_http_client_handle_t http_client, uint32_t &range_start); int upload_by_chunks_(esp_http_client_handle_t http_client, uint32_t &range_start);
#endif // ARDUINO vs USE_ESP_IDF #endif // USE_ARDUINO vs USE_ESP_IDF
/** /**
* Ends the upload process, restart Nextion and, if successful, * Ends the upload process, restart Nextion and, if successful,

View file

@ -1,7 +1,7 @@
#include "nextion.h" #include "nextion.h"
#ifdef USE_NEXTION_TFT_UPLOAD #ifdef USE_NEXTION_TFT_UPLOAD
#ifdef ARDUINO #ifdef USE_ARDUINO
#include "esphome/core/application.h" #include "esphome/core/application.h"
#include "esphome/core/defines.h" #include "esphome/core/defines.h"
@ -383,5 +383,5 @@ WiFiClient *Nextion::get_wifi_client_() {
} // namespace nextion } // namespace nextion
} // namespace esphome } // namespace esphome
#endif // ARDUINO #endif // USE_ARDUINO
#endif // USE_NEXTION_TFT_UPLOAD #endif // USE_NEXTION_TFT_UPLOAD