Gui-Guider Aircon samples Application built for zephyr

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Gui-Guider Aircon samples Application built for zephyr

跳至解决方案
1,929 次查看
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 项奖励
回复
1 解答
1,881 次查看
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.

 

 

在原帖中查看解决方案

2 回复数
1,882 次查看
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,848 次查看
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 项奖励
回复