Hello,
I am using the emwin library as part of a bigger embedded application. I am experiencing a bit strange behavior:
I am using the EDIT_Widgets to visualize some data (like current temperature, etc).
My dialog looks like the following
Display All
This is a very simplified example. My problem is here, that the function "EDIT_SetFloatValue( hItem, fDummy );" in line 28 does not return. Since this functions hols a mutex in my application, it blocks every functionality that needs that mutex.
However, if I insert "EDIT_SetFloatValue(hItem, 0);" after line 20, the program works and the function "EDIT_SetFloatValue" inside my "vUpdateActualSetpoints" does return. Also, if I change the value in line 27 to be between 10 and 50 it returns.
Is this behaviour known and intended? Is there a way to make sure, the emWin functions do always return?
I am using the emwin library as part of a bigger embedded application. I am experiencing a bit strange behavior:
I am using the EDIT_Widgets to visualize some data (like current temperature, etc).
My dialog looks like the following
C Source Code
- static void _cbDialog(WM_MESSAGE * pMsg) {
- WM_HWIN hItem;
- float fDummy;
- fDummy = -999999999.567;
- switch (pMsg->MsgId) {
- case WM_INIT_DIALOG:
- vInitDialog(pMsg);
- break
- case SOME_OTHER_EVENT:
- vUpdateActualSetpoints( pMsg);
- break
- ...
- }
- static void vInitDialog(WM_MESSAGE * pMsg){
- WM_HWIN hItem;
- hItem = WM_GetDialogItem(pMsg->hWin, ID_EDIT_6);
- WIDGET_SetEffect(hItem, &WIDGET_Effect_None );
- EDIT_SetFloatMode(hItem, 30, 10, 50, 2, GUI_EDIT_SUPPRESS_LEADING_ZEROES);
- }
- static void vUpdateActualSetpoints(WM_MESSAGE * pMsg)
- {
- WM_HWIN hItem;
- float fDummy;
- hItem = WM_GetDialogItem(pMsg->hWin, ID_EDIT_6);
- fDummy = -999999999.567;
- EDIT_SetFloatValue( hItem, fDummy );
- }
This is a very simplified example. My problem is here, that the function "EDIT_SetFloatValue( hItem, fDummy );" in line 28 does not return. Since this functions hols a mutex in my application, it blocks every functionality that needs that mutex.
However, if I insert "EDIT_SetFloatValue(hItem, 0);" after line 20, the program works and the function "EDIT_SetFloatValue" inside my "vUpdateActualSetpoints" does return. Also, if I change the value in line 27 to be between 10 and 50 it returns.
Is this behaviour known and intended? Is there a way to make sure, the emWin functions do always return?