AppWizard: APPW_SetVarData doesn't trigger WM_NOTIFICATION_VALUE_CHANGED

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

AppWizard: APPW_SetVarData doesn't trigger WM_NOTIFICATION_VALUE_CHANGED

ソリューションへジャンプ
1,304件の閲覧回数
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,291件の閲覧回数
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,292件の閲覧回数
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 件の賞賛
返信