studio
studio copied to clipboard
[LVGL]: Code-generation for User Widgets contains flow related code fragments also in lvgl only projects
Describe the bug Code-generation for plain lvgl project leads to compiler errors when the project contains user widgets, e.g.
Compiling .pio/build/native-tft-debug/lib/device-ui/generated/ui_320x240/screens.c.o
lib/device-ui/generated/ui_320x240/screens.c: In function ‘create_screen_main_screen’:
lib/device-ui/generated/ui_320x240/screens.c:1771:75: error: ‘flowState’ undeclared (first use in this function)
1771 | create_user_widget_ok_cancel_widget(obj, getFlowState(flowState, 0), 91);
| ^~~~~~~~~
lib/device-ui/generated/ui_320x240/screens.c:1771:75: note: each undeclared identifier is reported only once for each function it appears in
lib/device-ui/generated/ui_320x240/screens.c: In function ‘tick_screen_main_screen’:
lib/device-ui/generated/ui_320x240/screens.c:1781:52: error: ‘flowState’ undeclared (first use in this function)
1781 | tick_user_widget_ok_cancel_widget(getFlowState(flowState, 0), 91);
| ^~~~~~~~~
To Reproduce Steps to reproduce the behavior:
- Create new plain lvgl project (i.e. no flow, no eez-framework)
- Create a user widget, e.g. with a panel and button
- Add this widget to a page
- Generate the code
- Search screen.c for "flow"
Expected behavior Generated code is compile clean.
Screenshots
Desktop (please complete the following information):
- OS: Fedora Linux
- Version 39
** LVGL version: **
- 9.x
** eez-studio version: **
- master
Additional context Add any other context about the problem here.