MULTIEDIT, WM_MOTION

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

    • Florian,

      It would be logically correct if WM_MOTION module could track if it is still needed by any entities. Now if, say, the SWIPELIST is beeing created the WM_MOTION_Enable(1) is called by the library and no WM_MOTION_Enable(0) could be called upon the SWIPELIST destruction. So library engine continues to call heavy ExecMotion routine in vein, wasting CPU's cycles.

      P.S. As for the SWIPELIST, not every its entity is intended to swipe, it would be nice if the library allowed the user to choose this option as it did for MULTIEDIT with MULTIEDIT_EnableMotion.
    • Hi,

      You're right, it doesn't make sense for these routines to activate it globally when it is deactivated for a widget. I have fixed the _EnableMotion... routines so that they only activate motion support when the OnOff parameter is 1.

      The SWIPELIST automatically activates motion support, since the widget is usually intended as a list, that the user can swipe through (hence the name). Motion support is only enabled upon the creation of the widget. So if you don't need motion support for a SWIPELIST or any other widgets, you can simply deactivate it afterwards.

      We should clarify this a bit more in the emWin manual, exactly which widgets use motion support and when.

      Thank you for your input.

      Best regards,
      Florian