Skip to content

Commit

Permalink
show image fetched from HA
Browse files Browse the repository at this point in the history
  • Loading branch information
Habbie committed Apr 7, 2024
1 parent 6b756de commit 97b04ac
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/uicomponents/UICamera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,12 @@ void UICamera::update()
curl_easy_cleanup(curl_handle);
// end code from

lv_img_dsc_t img = {
img = {
.header = {
.cf = LV_IMG_CF_RAW_ALPHA,
.always_zero = 0,
.w = 50,
.h = 50,
.w = 0,
.h = 0,
},
};

Expand All @@ -128,6 +128,6 @@ void UICamera::update()

lv_img_set_src(imgpanel, &img);

free(chunk.memory);
// free(chunk.memory); // FIXME this leaks terribly
}
}
1 change: 1 addition & 0 deletions src/uicomponents/UICamera.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ class UICamera : public UIEntity
private:
// FIXME: we never free() the lv_obj_t*'s in code
lv_obj_t* imgpanel;
lv_img_dsc_t img;
};

0 comments on commit 97b04ac

Please sign in to comment.