studio icon indicating copy to clipboard operation
studio copied to clipboard

[LVGL]: Code-generation for User Widgets contains flow related code fragments also in lvgl only projects

Open mverch67 opened this issue 9 months ago • 1 comments

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:

  1. Create new plain lvgl project (i.e. no flow, no eez-framework)
  2. Create a user widget, e.g. with a panel and button
  3. Add this widget to a page
  4. Generate the code
  5. Search screen.c for "flow"

Expected behavior Generated code is compile clean.

Screenshots image

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.

mverch67 avatar May 17 '24 19:05 mverch67