379 views
in GUI Development by
Our application uses several sliders.

In EW the slider are working.

On the target hardware the sliders do not work. The touch driver receives touch positions.

1 Answer

0 votes
by

Hello.

Well this is not much information...

Can you please verify that the touch events are inserted properly into the UI application within your main.c?

Have a look to this question/answer which covers the same issue.

Best regards

Manfred

by

Hi Manfred,

regarding the link, you provided, my code looks quite different:

Since there is no GetTouchPosition(), EwBspGetTouchPosition() might be the correct one to look for.

But this function only returns 1 (touch received) or 0 (no touch received).

Also the code in main.c looks differen:

    /* receive touch inputs and provide the application with them */
    if ( EwBspGetTouchPosition( &touchPos ))
    {
      /* begin of touch cycle */
      if ( touched == 0 )
        CoreRoot__DriveCursorHitting( rootObject, 1, 0, touchPos );

      /* movement during touch cycle */
      else if ( touched == 1 )
        CoreRoot__DriveCursorMovement( rootObject, touchPos );

      touched = 1;
      events  = 1;
    }
    /* end of touch cycle */
    else if ( touched == 1 )
    {
      CoreRoot__DriveCursorHitting( rootObject, 0, 0, touchPos );
      touched = 0;
      events  = 1;
    }

The variable touched never gets set.

by

Hello,

so you can try the following code to see whether the touch cycle is complete:

   /* receive touch inputs and provide the application with them */
    if ( EwBspGetTouchPosition( &touchPos ))
    {
      /* begin of touch cycle */
      if ( touched == 0 )
      {
        EwPrint( "Down\n" );
        CoreRoot__DriveCursorHitting( rootObject, 1, 0, touchPos );
      }

      /* movement during touch cycle */
      else if ( touched == 1 )
      {
        EwPrint( "Move\n" );
        CoreRoot__DriveCursorMovement( rootObject, touchPos );
      }

      touched = 1;
      events  = 1;
    }
    /* end of touch cycle */
    else if ( touched == 1 )
    {
      EwPrint( "Up\n" );

      CoreRoot__DriveCursorHitting( rootObject, 0, 0, touchPos );
      touched = 0;
      events  = 1;
    }

If the sequences are not 'Down', 'Move'....'Move', 'Up' then you should have a closer look to your EwBspGetTouchPosition() implementation of the used touch driver.

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint

...