Skip to content
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

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

Closed
mverch67 opened this issue May 17, 2024 · 1 comment
Assignees
Labels
Milestone

Comments

@mverch67
Copy link

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 mverch67 added the bug label May 17, 2024
@mvladic mvladic added this to the M20 milestone May 17, 2024
mvladic added a commit that referenced this issue May 19, 2024
@mvladic
Copy link
Contributor

mvladic commented May 19, 2024

Fixed. References to the flowState in generated code are removed when eez-flow is not used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants