-
Notifications
You must be signed in to change notification settings - Fork 7.4k
samples/modules: Add LVGL demo sample #62904
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
bfe2983
to
373d533
Compare
373d533
to
aa16ba4
Compare
d7fd8fe
to
20faa87
Compare
20faa87
to
8fbb9d4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So cool, thanks for this!
samples/modules/lvgl/README.rst
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this needs an additional sub-directory, i.e. samples/modules/lvgl/demos
, like other modules/ samples, and in case there are more sample added over time.
Also, the other "basic" LVGL sample lives in subsys/display/lvgl, so I don't know if we would maybe want all LVGL samples in the same place?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Surely this can be moved, when working on this one I felt that it was kind of an odd choice to begin with to have the lvgl sample in the display subsys. I guess its the easiest way to show something on the display. Fine with moving the basic sample here also.
Will move this one to the demo subdir as suggested.
c527caa
to
76a71ea
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just tested successfully on M5Stack Core2 and Wio Terminal (music is too big for this one though), this will be a very cool addition.
See couple addition comments re: README, and an open question re: enabling CONFIG_INPUT
in prj.conf.
Adds a sample which allows to build the LVGL upstream demo applications (music, benchmark, stress). Resolves issue zephyrproject-rtos#62744. Signed-off-by: Fabian Blatz <[email protected]>
f4ec19d
to
a48b280
Compare
* Music | ||
The music player demo shows what kind of modern, smartphone-like user interfaces can be created on LVGL. | ||
* Benchmark | ||
The benchmark demo tests the performance in various cases. For example rectangle, border, shadow, text, image blending, image transformation, blending modes, etc. | ||
* Stress | ||
A stress test for LVGL. It contains a lot of object creation, deletion, animations, styles usage, and so on. It can be used if there is any memory corruption during heavy usage or any memory leaks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
#define LOG_LEVEL CONFIG_LOG_DEFAULT_LEVEL | ||
#include <zephyr/logging/log.h> | ||
LOG_MODULE_REGISTER(app); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can just do LOG_MODULE_REGISTER(app, CONFIG_LOG_DEFAULT_LEVEL);
and drop the define above
display_dev = DEVICE_DT_GET(DT_CHOSEN(zephyr_display)); | ||
if (!device_is_ready(display_dev)) { | ||
LOG_ERR("Device not ready, aborting test"); | ||
return 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changes nothing in this case but it's odd to catch an error and return 0... -ENODEV
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, brilliant, thank you @faxe1008! This is great work
Adds a sample which allows to build the LVGL upstream demo applications (music, benchmark, stress).
Resolves #62744.
The other samples still need some work to be added: