SWIPELIST not scrolling reliably

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

    • SWIPELIST not scrolling reliably


      Thank you for the wonderful product that emWin is. I truly have never seen such a well rounded product. Thank you for that.

      I am currently having an issue with a SWIPELIST. Please watch the video here:

      SWIPELIST Issues

      As you can see I am able to scroll a MULTIEDIT window with the vertical scroll bar without issue, but when I try to scroll the SWIPELIST, it will only scroll in little bursts. In the video I also show that my x and y touch points are being updated correctly as well as the touch state.

      I am updating emWin with the current touch coordinates via GUI_TOUCH_StoreStateEx(&TS_State);

      Any ideas on what might be going on here?



      The post was edited 1 time, last by JimJamUrCode: Accidentally submitted a half complete post. ().

    • Hi,

      Is it possible to post your code where you pass the touch input to emWin?
      Attached is a PIDConf.c we use for the STM32F746 Discovery.

      It looks a bit like an issue with touch rather than with the SWIPELIST.

      Can you also post your application?
      I'd like to reproduce that.

      Which emWin version are you using?

      • PIDConf.zip

        (6.8 kB, downloaded 50 times, last: )
    • I looked at the PIDConf.zip provided, the code is very similar to what I have, the biggest difference being that I am using TIM3 interrupt to trigger my touchscreen polling code instead of an RTOS, task, and a delay.

      Source Code

      1. static void PollTouchScreen(void)
      2. {
      3. static GUI_PID_STATE TsPidState;
      4. TS_StateTypeDef ts;
      5. BSP_TS_GetState(&ts);
      6. if(ts.touchDetected)
      7. {
      8. TsPidState.Layer = 0;
      9. TsPidState.x = ts.touchX[0];
      10. TsPidState.y = ts.touchY[0];
      11. TsPidState.Pressed = 1;
      12. GUI_TOUCH_StoreStateEx(&TsPidState);
      13. }
      14. else
      15. {
      16. if(TsPidState.Pressed == 1)
      17. {
      18. TsPidState.Pressed = 0;
      19. GUI_TOUCH_StoreStateEx(&TsPidState);
      20. }
      21. }
      22. }
      Display All
      I cannot post my application publicly, if there is a way to privately share, I can do that.

      I am actually using STemWin, I am not entirely sure what version is included with STM32CubeMX. If there is a way to extract this information, please share.

      I agree that this very well could be an issue with touch rather than the SWIPELIST. I found it weird that the MULTIEDIT scroll bar worked fine though.

      I followed this guide to get my touch screen working.


      The post was edited 1 time, last by JimJamUrCode: Reworded some text to hopefully indicate that I am not using an RTOS at all. Super loop is the methodology I am attempting to use. ().

    • Hi,

      Might it be possible that the touchscreen fires a lot of interrupts which prevents emWin from updating the SWIPELIST?

      But on the other hand this would also prevent emWin from updating the MULTIEDIT..

      Right now I have no idea what could cause this issue.
      I will try to reproduce it.

      You can search for the file GUI_Version.h in your project. There you will find the version of emWin.

    • I have just checked the version of emWin, in this project it’s 54401.

      I will try to reduce the timing of my interrupts to be closer to the 25 milliseconds you have in your PIDConf. Right now my interrupt fires about once every 15 milliseconds.

      Today I will strip out all of the proprietary source code so I can upload the project for you to examine.

    • Hello again,

      As I was prepping a demo of this problem, I found the issue...

      Source Code

      1. void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim)
      2. {
      3. if (htim->Instance == TIM6)
      4. GUI_Tick();
      5. }
      6. void GUI_Tick(void)
      7. {
      8. OS_TimeMS++;
      9. }
      When I first built this project, I implemented the GUI_Tick() function in a portion of code that STM32CubeMX destroyed when rebuilding my project. It went unnoticed until now. Without looking at the SWIPELIST source code, my guess is that the acceleration and deceleration functions rely on some sort of timing, and without that time, we have a SWIPELIST that doesn't really function. This is probably the reason why the MULTIEDIT scroll bar works just fine, its not reliant on timing.

      Out of curiosity, is the GUI_Tick() function mentioned in the emWin manual? I wasn't able to find it, only references to GUI_TIMER_TIME.