AppWizard: APPW_SetVarData doesn't trigger WM_NOTIFICATION_VALUE_CHANGED

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

AppWizard: APPW_SetVarData doesn't trigger WM_NOTIFICATION_VALUE_CHANGED

Jump to solution
1,078 Views
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

Tags (1)
0 Kudos
1 Solution
1,065 Views
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.

View solution in original post

0 Kudos
1 Reply
1,066 Views
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 Kudos