mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-25 20:26:41 +00:00
Don't use http src on ESP8266
This commit is contained in:
parent
7e97baaf68
commit
f0e57e92b4
@ -11,6 +11,8 @@
|
|||||||
/*** Image Improvement ***/
|
/*** Image Improvement ***/
|
||||||
#if defined(ARDUINO_ARCH_ESP8266)
|
#if defined(ARDUINO_ARCH_ESP8266)
|
||||||
#include <ESP8266HTTPClient.h>
|
#include <ESP8266HTTPClient.h>
|
||||||
|
#define lodepng_malloc malloc
|
||||||
|
#define lodepng_free free
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(ARDUINO_ARCH_ESP32)
|
#if defined(ARDUINO_ARCH_ESP32)
|
||||||
@ -1007,7 +1009,7 @@ static hasp_attribute_type_t special_attribute_src(lv_obj_t* obj, const char* pa
|
|||||||
if(payload != strstr_P(payload, PSTR("http://"))) {
|
if(payload != strstr_P(payload, PSTR("http://"))) {
|
||||||
lv_img_set_src(obj, payload);
|
lv_img_set_src(obj, payload);
|
||||||
} else {
|
} else {
|
||||||
#ifdef ARDUINO
|
#if defined(ARDUINO) && defined(ARDUINO_ARCH_ESP32)
|
||||||
HTTPClient http;
|
HTTPClient http;
|
||||||
http.begin(payload);
|
http.begin(payload);
|
||||||
int httpCode = http.GET();
|
int httpCode = http.GET();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user