From f18403d9c3ccc0871b7bcfc08a0d6f4a1cf82b2a Mon Sep 17 00:00:00 2001 From: fvanroie Date: Thu, 21 Jul 2022 00:56:46 +0200 Subject: [PATCH] Check for HASP_USE_WIFI or HASP_USE_ETHERNET --- src/hasp/hasp_attribute.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/hasp/hasp_attribute.cpp b/src/hasp/hasp_attribute.cpp index 772a0ba9..9cbfd36c 100644 --- a/src/hasp/hasp_attribute.cpp +++ b/src/hasp/hasp_attribute.cpp @@ -1320,7 +1320,8 @@ static hasp_attribute_type_t special_attribute_src(lv_obj_t* obj, const char* pa } } else { -#if defined(ARDUINO) && defined(ARDUINO_ARCH_ESP32) && 1 +#if defined(ARDUINO) && defined(ARDUINO_ARCH_ESP32) +#if HASP_USE_WIFI > 0 || HASP_USE_ETHERNET > 0 HTTPClient http; http.begin(payload); @@ -1462,7 +1463,8 @@ static hasp_attribute_type_t special_attribute_src(lv_obj_t* obj, const char* pa LOG_WARNING(TAG_ATTR, "HTTP result %d", httpCode); } http.end(); -#endif +#endif // HASP_USE_NETWORK +#endif // ESP32 } } else { const void* src = lv_img_get_src(obj);