mirror of https://github.com/esphome/esphome.git
Lint
This commit is contained in:
parent
1414c9aad4
commit
c520e1a134
|
@ -1243,7 +1243,11 @@ class Nextion : public NextionBase, public PollingComponent, public uart::UARTDe
|
||||||
* @note Ensure that the HTTP client is initialized and not NULL before calling this function
|
* @note Ensure that the HTTP client is initialized and not NULL before calling this function
|
||||||
* to avoid runtime errors.
|
* to avoid runtime errors.
|
||||||
*/
|
*/
|
||||||
void close_http_client_(auto &http_client);
|
#ifdef ARDUINO
|
||||||
|
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
|
||||||
|
|
||||||
#endif // USE_NEXTION_TFT_UPLOAD
|
#endif // USE_NEXTION_TFT_UPLOAD
|
||||||
|
|
||||||
|
|
|
@ -423,16 +423,20 @@ bool Nextion::upload_tft(uint32_t baud_rate, bool exit_reparse) {
|
||||||
return upload_end_(true);
|
return upload_end_(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Nextion::close_http_client_(auto &http_client) {
|
|
||||||
ESP_LOGD(TAG, "Close HTTP connection");
|
|
||||||
#ifdef ARDUINO
|
#ifdef ARDUINO
|
||||||
|
void Nextion::close_http_client_(HttpClient &http_client) {
|
||||||
|
ESP_LOGD(TAG, "Close HTTP connection");
|
||||||
http_client.end();
|
http_client.end();
|
||||||
#else // ESP-IDF
|
|
||||||
esp_http_client_close(http_client);
|
|
||||||
esp_http_client_cleanup(http_client);
|
|
||||||
#endif
|
|
||||||
ESP_LOGV(TAG, "Connection closed");
|
ESP_LOGV(TAG, "Connection closed");
|
||||||
}
|
}
|
||||||
|
#else // ESP-IDF
|
||||||
|
void Nextion::close_http_client_(esp_http_client_handle_t http_client) {
|
||||||
|
ESP_LOGD(TAG, "Close HTTP connection");
|
||||||
|
esp_http_client_close(http_client);
|
||||||
|
esp_http_client_cleanup(http_client);
|
||||||
|
ESP_LOGV(TAG, "Connection closed");
|
||||||
|
}
|
||||||
|
#endif // ARDUINO vs ESP-IDF
|
||||||
|
|
||||||
bool Nextion::upload_end_(bool successful) {
|
bool Nextion::upload_end_(bool successful) {
|
||||||
ESP_LOGD(TAG, "Nextion TFT upload finished: %s", YESNO(successful));
|
ESP_LOGD(TAG, "Nextion TFT upload finished: %s", YESNO(successful));
|
||||||
|
|
Loading…
Reference in New Issue