WM_NOTIFICATION_RELEASED: not being sent after a while.

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • WM_NOTIFICATION_RELEASED: not being sent after a while.

      Hi,

      I am working on building different screens for my project. Everything works fine for sometime after which I can only see buttons being pressed but there is no response to that touch whatsoever.
      I am calling GUI_TOUCH_Exec() in an ISR every 10ms. I am using no OS and resistive touchscreen. Has anyone here come across this issue before? I would greatly appreciate any help with this regard.

      Best regards,
      BMD
    • Hi
      I have also faced a similar issue
      You can check whether your touch screen senses some point(x,y) continuously even if not pressed
      If your touch screen senses some point , try to configure initial point to (0,0)
      Thanks
      R Sridhar
    • Sridhar,

      Thank you for your response but I am facing problems with only WM_NOTIFICATION_RELEASED. Touchscreen seems to be working fine. I don't see any touch screen sense or anything as such.

      Best regards,
      BMD
    • C Source Code

      1. // USER START (Optionally insert additional includes)
      2. // USER END
      3. #include "project.h"
      4. #include <stddef.h>
      5. #include <string.h>
      6. #include "WIDGET.h"
      7. #include "WM.h"
      8. #include "BUTTON.h"
      9. #include "DIALOG.h"
      10. #include "FS.h"
      11. #define RECOMMENDED_MEMORY (1024L * 5)
      12. /*********************************************************************
      13. *
      14. * Defines
      15. *
      16. **********************************************************************
      17. */
      18. #define ID_WINDOW_0 (GUI_ID_USER + 0x00)
      19. #define ID_HEADER_0 (GUI_ID_USER + 0x01)
      20. extern void DrawBMPExternalMemory();
      21. extern void CreateToolsScreen1();
      22. extern void MainScreen();
      23. /*********************************************************************
      24. *
      25. * _aDialogCreate
      26. */
      27. static const GUI_WIDGET_CREATE_INFO _aDialogCreate[] =
      28. {
      29. { WINDOW_CreateIndirect, "Tools", ID_WINDOW_0, 0, 0, 320, 240, 0, 0x0, 0},
      30. { BUTTON_CreateIndirect, "Oxygen Calibration", GUI_ID_BUTTON0, 25, 40, 185, 35, 0, 0x0, 0},
      31. { BUTTON_CreateIndirect, "Touchscreen Calibration", GUI_ID_BUTTON1, 25, 90, 185, 35, 0, 0x0, 0},
      32. { BUTTON_CreateIndirect, "LCD Test", GUI_ID_BUTTON2, 25, 140, 185, 35, 0, 0x0, 0},
      33. { BUTTON_CreateIndirect, "Back", GUI_ID_BUTTON3, 15, 205, 80, 25, 0, 0x0, 0},
      34. { BUTTON_CreateIndirect, "Home", GUI_ID_BUTTON4, 120, 205, 80, 25, 0, 0x0, 0},
      35. { BUTTON_CreateIndirect, "Next", GUI_ID_BUTTON5, 225, 205, 80, 25, 0, 0x0, 0},
      36. { IMAGE_CreateIndirect, "Image_O2Cell", GUI_ID_IMAGE0, 255, 40, 46, 35, 0, 0x0, 0},
      37. { IMAGE_CreateIndirect, "Image_Touchscreen", GUI_ID_IMAGE1, 255, 90, 46, 35, 0, 0x0, 0},
      38. { IMAGE_CreateIndirect, "Image_LCDtest", GUI_ID_IMAGE2, 255, 140, 46, 35, 0, 0x0, 0},
      39. };
      40. static void _cbToolsScreen(WM_MESSAGE * pMsg)
      41. {
      42. int NCode;
      43. int Id;
      44. WM_HWIN hDlg;
      45. BUTTON_Handle hButton;
      46. IMAGE_Handle hImage;
      47. hDlg = pMsg ->hWin;
      48. switch (pMsg->MsgId)
      49. {
      50. case WM_PAINT:
      51. //
      52. // Draw the background. This is quite important because otherwise we would still see the child window although it gets deleted.
      53. // With this drawing the background wouldn't "know" how to draw itself.
      54. //
      55. GUI_SetBkColor(GUI_BEIGE_BACKGROUND);
      56. GUI_Clear();
      57. break;
      58. case WM_NOTIFY_PARENT:
      59. Id = WM_GetId(pMsg->hWinSrc);
      60. NCode = pMsg->Data.v;
      61. switch (NCode)
      62. {
      63. case WM_NOTIFICATION_RELEASED:
      64. if(Id == GUI_ID_BUTTON0) // 'O2Ccalibration Button'
      65. {
      66. // WM_CreateWindowAsChild(0, 0, 320, 240, WM_HBKWIN, WM_CF_SHOW, _cbO2Cell, 0);
      67. }
      68. if(Id == GUI_ID_BUTTON1) //'Touchscreen Calibration Button'
      69. {
      70. // WM_CreateWindowAsChild(0, 0, 320, 240, WM_HBKWIN, WM_CF_SHOW, _cbO2Cell, 0);
      71. }
      72. if(Id == GUI_ID_BUTTON2) //'LCD Test Button'
      73. {
      74. // WM_CreateWindowAsChild(0, 0, 320, 240, WM_HBKWIN, WM_CF_SHOW, _cbO2Cell, 0);
      75. }
      76. if(Id == GUI_ID_BUTTON3) //'Back Button'
      77. {
      78. }
      79. if(Id == GUI_ID_BUTTON4)
      80. {
      81. GUI_EndDialog(hDlg,1);
      82. MainScreen();//'Home Button'
      83. }
      84. if(Id == GUI_ID_BUTTON5) //'Next Button'
      85. {
      86. GUI_EndDialog(hDlg,1);
      87. CreateToolsScreen1();
      88. }
      89. }
      90. break;
      91. // USER START (Optionally insert additional message handling)
      92. // USER END
      93. default:
      94. WM_DefaultProc(pMsg);
      95. break;
      96. }
      97. }
      98. /*********************************************************************
      99. *
      100. * Public code
      101. *
      102. **********************************************************************
      103. */
      104. /*********************************************************************
      105. *
      106. * CreateWindow
      107. */
      108. void CreateToolsScreen(void)
      109. {
      110. //
      111. // Check if recommended memory for the sample is available
      112. //
      113. if (GUI_ALLOC_GetNumFreeBytes() < RECOMMENDED_MEMORY) {
      114. GUI_ErrorOut("Not enough memory available.");
      115. return;
      116. }
      117. //
      118. // Use memory devices for all windows
      119. //
      120. #if GUI_SUPPORT_MEMDEV
      121. WM_SetCreateFlags(WM_CF_MEMDEV);
      122. WM_EnableMemdev(WM_HBKWIN);
      123. #endif
      124. WM_SetDesktopColor(GUI_BLACK);
      125. while(1)
      126. {
      127. GUI_ExecDialogBox(_aDialogCreate, GUI_COUNTOF(_aDialogCreate), &_cbToolsScreen, 0, 0, 0);
      128. GUI_Delay(1);
      129. }
      130. }
      131. /*************************** End of file ****************************/
      Display All
      Is there someone here who came across the same problem? I just want to know if this problem makes sense or its something I am doing that causes it?
      I have attached a screen that I am currently working on as a reference. I have three similar screens and while trying to navigate between each one, I see this problem.

      I would really appreciate if anyone could help me with this regard.
      Best regards,
      BMD
    • Hi,

      can you send me a sample that I can execute to reproduce the behavior?

      Thanks and best regards,

      Florian
      Please read the forum rules before posting.

      Keep in mind, this is *not* a support forum.
      Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
      Should you be entitled to support you can contact us via our support system: segger.com/ticket/

      Or you can contact us via e-mail.
    • Florian,

      Did you get a chance to check out my files? Did you find anything unusual in the code? Were you able to see similar results as mine or did it work okay for you?

      Appreciate all the help!

      Best regards,
      BMD
    • Hi,

      I didn't find anything unusual. But once again I couldn't execute it because there were files missing.

      Can you try to reproduce that behavior in a 'stand-alone' sample, ideally in one file?

      Thanks and best regards,

      Florian
      Please read the forum rules before posting.

      Keep in mind, this is *not* a support forum.
      Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
      Should you be entitled to support you can contact us via our support system: segger.com/ticket/

      Or you can contact us via e-mail.
    • Florian,

      I am sorry I missed a file and images for SD card. Please see attached.
      Could you please give it a try now?

      Note:
      The reason I am not doing a 'stand-alone' file is we have certain code standards to follow and I wanted things to work when I have each function in it's own file.

      Best regards,
      BMD
      Files