AppWizard: APPW_SetVarData doesn't trigger WM_NOTIFICATION_VALUE_CHANGED

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

AppWizard: APPW_SetVarData doesn't trigger WM_NOTIFICATION_VALUE_CHANGED

跳至解决方案
1,495 次查看
DaPa1
Contributor III

Using AppWizard 1.08 with evkb-imxrt1050. We discovered that if an APPW_VAR_OBJECT variable is modified from back-end (UART or SPI) then GUI doesn't receive WM_NOTIFICATION_VALUE_CHANGED until the screen is touched.

Is this is known issue? Is there a workaround (some kind of PostMessage or ForcesUpdate, etc) to trigger the notification?

Attached is a simple example which updates a slider and a text when an ID_VAR_00__IN is modified. ID_VAR_00__IN is incremented when '2' is received from UART, respectively decremented when '1' is received. Can be seen that even the value is modified, the GUI doesn't receive any ID_SCREEN_00__WM_NOTIFICATION_VALUE_CHANGED, unless the screen is touched anywhere. Tried with both libemWin_M7.a (with FP) and libGUI.a (no FP) but same effect.

Please help, thanks!

Daniel

标记 (1)
0 项奖励
回复
1 解答
1,482 次查看
DaPa1
Contributor III

Well, we found the bug and it was due what we thought to be an "optimisation". This works:

    while (1) {

        if (GUI_Exec1()) {

            APPW_Exec();

        }

        APPW_Exec();

    }

 And this fails:

    while (1) {

        if (GUI_Exec1()) {

            APPW_Exec();

        }

        

    }

Seems that the extra APPW_Exec after all GUI_Exec is needed and is the one that helps in getting notifications from variable changing.

在原帖中查看解决方案

0 项奖励
回复
1 回复
1,483 次查看
DaPa1
Contributor III

Well, we found the bug and it was due what we thought to be an "optimisation". This works:

    while (1) {

        if (GUI_Exec1()) {

            APPW_Exec();

        }

        APPW_Exec();

    }

 And this fails:

    while (1) {

        if (GUI_Exec1()) {

            APPW_Exec();

        }

        

    }

Seems that the extra APPW_Exec after all GUI_Exec is needed and is the one that helps in getting notifications from variable changing.

0 项奖励
回复