Comments (9)
TL;DR: looks good to me although I have not tested it yet. You can consider this issue resolve from my perspective. Thanks for your support.
I am actually working with master
here for a professional project I am involved in. It is actually the beginning of it and you will likely hear from me again :)
I have not checked the rework-7
branch yet, only a quick glance to not couple my code too closed to the 6.1.2
as 7.0
is coming.
As far as I can see, with both 474dc1f0 and 5fd053b8, it should fix the issues I have encountered. It achieves the same result as in my branch compared to master
.
I can live we the fix on my branch for the time being as I understand it is not worth the pain of future conflicts when merging rework-7
.
from lv_demos.
Hi,
You are right, it was accidentally removed.
I've just added back this functionality. Could you try it?
from lv_demos.
Hi Gabor,
that looks good to me. Could you also add similar fix for assets?
Thanks,
Jozef
from lv_demos.
Good point. I've updated the assets too.
from lv_demos.
Hi,
First, thanks for the work @kisvegabor! I've just discovered this library and it is something I've been looking for, for a long time.
Concerning this issue, in my current setup, I want a configuration file per application (a source file with main.c
plus a lv_conf.h
and a lv_drv_conf.h
by its side). But all my applications share the same submodules, in this case, LittlevGL submodules like lvgl
, lv_drivers
, and lv_examples
.
Hence, here, shouldn't it be LV_LVGL_H_INCLUDE_SIMPLE
instead? Like in lv_drivers
? Otherwise, my setup does work for drivers but not for examples.
In lv_drivers
:
/*********************
* INCLUDES
*********************/
#ifndef LV_DRV_NO_CONF
#ifdef LV_CONF_INCLUDE_SIMPLE
#include "lv_drv_conf.h"
#else
#include "../../lv_drv_conf.h"
#endif
#endif
#if USE_EVDEV
#ifdef LV_LVGL_H_INCLUDE_SIMPLE
#include "lvgl.h"
#else
#include "lvgl/lvgl.h"
#endif
/*********************
* DEFINES
*********************/
In lv_examples
:
/*********************
* INCLUDES
*********************/
#ifdef LV_CONF_INCLUDE_SIMPLE
#include "lvgl.h"
#include "lv_ex_conf.h"
#else
#include "../../../lvgl/lvgl.h"
#include "../../../lv_ex_conf.h"
#endif
#if LV_USE_TESTS
/*********************
* DEFINES
*********************/
Thanks,
Hugo
from lv_demos.
Actually, I have found several issues with the includes in this repository, on the master branch already. I wrote patches to apply locally. Is it something you are interested in? I can file a PR.
Here are the issues I encountered on my way:
- the way
lvgl.h
include is handled here is not consistent withlv_drivers
- so I basically applied the same schema in every include in
lv_examples
, for instance, inlv_test_obj.h
, this patch is applied:
+#ifndef LV_EX_NO_CONF
#ifdef LV_CONF_INCLUDE_SIMPLE
-#include "lvgl.h"
#include "lv_ex_conf.h"
#else
-#include "../../../lvgl/lvgl.h"
#include "../../../lv_ex_conf.h"
#endif
+#endif
#if LV_USE_TESTS
+#ifdef LV_LVGL_H_INCLUDE_SIMPLE
+#include "lvgl.h"
+#else
+#include "lvgl/lvgl.h"
+#endif
+
- it works fine, except for the tests that rely on the activation of features via
LV_USE_*
, like inlv_test_cont.h
, we can find this line#if LV_USE_CONT && LV_USE_TESTS
. But, with the above patch,lvgl.h
comes after the#if
, hence compiler complainsLV_USE_CONT
is not defined... I could have put it before, but then it would still be inconsistent with the way it is done inlv_drivers
. So I opted for another approach, since there is mainlv_examples.h
that includelvgl.h
. Here is the new patch forlv_test_obj.h
, that also work forlv_test_cont.h
:
+#include "../../../lv_examples.h"
+
+#ifndef LV_EX_NO_CONF
#ifdef LV_CONF_INCLUDE_SIMPLE
-#include "lvgl.h"
#include "lv_ex_conf.h"
#else
-#include "../../../../lvgl/lvgl.h"
#include "../../../../lv_ex_conf.h"
#endif
+#endif
#if LV_USE_CONT && LV_USE_TESTS
with lv_examples.h
being patched with:
-#include "../lvgl/lvgl.h"
+#ifdef LV_LVGL_H_INCLUDE_SIMPLE
+#include "lvgl.h"
+#else
+#include "lvgl/lvgl.h"
+#endif
- great that works as expected, but know I have not activated
LV_USE_DEMO
, and#if
order in makes compiler complains aboutLV_DEMO_WALLPAPER
not being defined, with-Wundef
flag:
img_bubble_pattern.c:4:5: error: 'LV_DEMO_WALLPAPER' is not defined
I just switched the condition order like this:
-#if LV_DEMO_WALLPAPER && LV_USE_DEMO
+#if LV_USE_DEMO && LV_DEMO_WALLPAPER
and it works fine!
- I am happy, now my setup works great, and
lv_examples
behaves likelv_drivers
, which is a good sign of coherence in the library.
FYI: For 4., I'll file a PR; what do you think of 3.?
Have a great Monday,
Hugo
from lv_demos.
Hi Hugo,
Ups, really there are some inconsistencies here. Thank you for pointing it out.
As the examples are displayed in the documentation too so it'd be important to keep the "header" part short.
As master
will be replaced soon with rework-7
let's see what are the issue there.
I pushed a fix to solve the issue you have mentioned in your first comment. 5fd053b
Does dev-7.0
of lvgl
works normally now with rework-7
of lv_examples
?
from lv_demos.
I am actually working with master here for a professional project I am involved in. It is actually the beginning of it and you will likely hear from me again :)
Looking forward to it! 🙂
from lv_demos.
It seems all working for v7.0, so I close this issue,
from lv_demos.
Related Issues (20)
- please fix lv_demo_music_main.c HOT 1
- error with lv_examples.h in arduino HOT 1
- Using LV_ demo_ benchmark(); During template compilation, the following contents will appear, as if img is not defined? HOT 4
- For which version of LVGL are these demos? HOT 2
- lv_demo_widgets problem - no buffer size info HOT 3
- Add /* clang-format off */ HOT 2
- lv_demo_benchmark causes floating point exception HOT 2
- lv_demo_music_list.c “font_small” and “font_medium” Pointer on const HOT 1
- This [lv_demo_widgets] may not be used strictly. Why const? HOT 1
- time variable naming conflict HOT 1
- we need create this chart, what should i do? HOT 1
- lv_demo_music_main.c implicit declaration of function HOT 2
- #132 breaks build HOT 4
- We try to use shadows to achieve this effect, but how to remove this line HOT 4
- lv_demo_widgets, no member "text_length" HOT 6
- lv_demo_widgets, no display HOT 14
- demo, wrong pixel / lines ( glitched rendering ) HOT 9
- lv_demo_benchmark, Arithmetic exception, in lv_sim_vscode_sdl
- Could you offer a simplest demo? HOT 4
- Would a PR to update to v8.3.1 of lvgl be considered? HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lv_demos.