Gui-Guider Aircon samples Application built for zephyr

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Gui-Guider Aircon samples Application built for zephyr

Jump to solution
1,279 Views
RafalHalik
Contributor II

 

Hey,

While working with the NXP Gui Guider I've come across this strange issue where the generated code cant be built for zephyr due to an extra parameter in lv_animing_set_src. I am not sure when this had changed or if its an error with the code generator but a few weeks ago the generated code worked for me. 

 

Gui-Guider:

version used: GUI-Guider-1.7.0-GA

LVGL Version 8.3.10 selected 

Target board (i.MX RT) MIMXRT1060_EVKB

Aircon Application selected to use as template 

Zephyr workspace: 

LVGL ver: 8.3.11

Zephyr ver: 3.6.99

 

Generated C code for this template 

Exported code for zephyr 

In File: setup_scr_ui_Aircon.c 

 

Screenshot 2024-03-15 144859.png

96 |  lv_animimg_set_src(ui->ui_Aircon_aircon_fan, (const void **) ui_Aircon_aircon_fan_imgs, 6, false);

Fails due to the extra paramter passed, "false" the last paramter which isnt required in this function call.

Screenshot 2024-03-15 145225.png

When i remove the extra paramter from the function call it seems to work as long as i add a blank "lv_font.h" file into the guider_customer_fonts directory

Screenshot 2024-03-15 150030.png

 

 

Is this a bug or am I missing something?

0 Kudos
Reply
1 Solution
1,231 Views
EdwinHz
NXP TechSupport
NXP TechSupport

Hi @RafalHalik,

From the Animation Image API for v8.3 (Animation Image (lv_animimg) — LVGL documentation), the function "lv_animimg_set_src()" only has 3 parameters:

EdwinHz_0-1711049940376.png

That said, code that GUI Guider generates adds a 4th parameter to this function as a 'reverse parameter':

EdwinHz_1-1711050316152.png

This allows GUI Guider to control the direction of flow of the animation with a simple switch:

EdwinHz_3-1711050426730.png

EdwinHz_4-1711050442117.png

Ironically, this extra parameter is not meant to be a bug, but rather a feature...

However, as I mentioned before, LVGL doesn't natively have this "feature". This can be proved by creating a project from scratch in MCUXpresso and adding the LVGL middleware afterwards. In other words, create an LVGL project outside of GUI Guider. Doing this resulted in a "lv_animimg_set_src()" function without the reverse feature, and followed the normal API description:

EdwinHz_5-1711050669138.png

In conclusion, the extra parameter is added by GUI Guider as a feature, but your Zephyr workspace probably already had the LVGL middleware with the "normal" 3 parameter lv_animimg_set_src() function rather than the 4 parameter one that GUI Guider generates. deleting this extra parameter is enough to have the example work, as you mention, but you could also just add the "reverse" if-else condition that GUI Guider creates for this function and this way any GUI Guider project that uses an animated image will work on your Zephyr workspace.

I hope this helps!

BR,
Edwin.

 

 

View solution in original post

2 Replies
1,232 Views
EdwinHz
NXP TechSupport
NXP TechSupport

Hi @RafalHalik,

From the Animation Image API for v8.3 (Animation Image (lv_animimg) — LVGL documentation), the function "lv_animimg_set_src()" only has 3 parameters:

EdwinHz_0-1711049940376.png

That said, code that GUI Guider generates adds a 4th parameter to this function as a 'reverse parameter':

EdwinHz_1-1711050316152.png

This allows GUI Guider to control the direction of flow of the animation with a simple switch:

EdwinHz_3-1711050426730.png

EdwinHz_4-1711050442117.png

Ironically, this extra parameter is not meant to be a bug, but rather a feature...

However, as I mentioned before, LVGL doesn't natively have this "feature". This can be proved by creating a project from scratch in MCUXpresso and adding the LVGL middleware afterwards. In other words, create an LVGL project outside of GUI Guider. Doing this resulted in a "lv_animimg_set_src()" function without the reverse feature, and followed the normal API description:

EdwinHz_5-1711050669138.png

In conclusion, the extra parameter is added by GUI Guider as a feature, but your Zephyr workspace probably already had the LVGL middleware with the "normal" 3 parameter lv_animimg_set_src() function rather than the 4 parameter one that GUI Guider generates. deleting this extra parameter is enough to have the example work, as you mention, but you could also just add the "reverse" if-else condition that GUI Guider creates for this function and this way any GUI Guider project that uses an animated image will work on your Zephyr workspace.

I hope this helps!

BR,
Edwin.

 

 

1,198 Views
RafalHalik
Contributor II

Hey @EdwinHz 

Ah I see must of missed that. Well that's good to know thankyou for your time and great answer, very detailed! 

0 Kudos
Reply