mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-27 05:06:44 +00:00
Http images for Arduino only
This commit is contained in:
parent
a0c9116fcb
commit
41d42a7ded
@ -1007,6 +1007,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
|
||||||
HTTPClient http;
|
HTTPClient http;
|
||||||
http.begin(payload);
|
http.begin(payload);
|
||||||
int httpCode = http.GET();
|
int httpCode = http.GET();
|
||||||
@ -1077,6 +1078,7 @@ static hasp_attribute_type_t special_attribute_src(lv_obj_t* obj, const char* pa
|
|||||||
} else {
|
} else {
|
||||||
LOG_WARNING(TAG_ATTR, "HTTP result %d", httpCode);
|
LOG_WARNING(TAG_ATTR, "HTTP result %d", httpCode);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
switch(lv_img_src_get_type(obj)) {
|
switch(lv_img_src_get_type(obj)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user