1k views
in Embedded Wizard Studio by
I have changed the main.c to use what I think is the correct event which for me is event3

 

Not sure what information to add so just ask for any you need

 

Thank you.
by
I am also using the offical 7" display screen

1 Answer

+1 vote
by

Hi!

Can you please let us know which touch coordinates are reported when pressing on the touch screen? Therefore please add within line 124 of your main.c the following print function:

EwPrint( "X: %d, Y: %d\n", TouchEventXPos, TouchEventYPos );

Best regards,
Manuel

 

by

Sorry tad confused 

SyntaxEditor Code Snippet<!--StartFragment-->

      if ( type == 3 )
      {
        if ( code == 0 )
          TouchEventXPos = ( EwScreenSize.X * ( value - X_MIN ) ) / ( X_MAX - X_MIN ); 
        else if ( code == 1 )
          TouchEventYPos = ( EwScreenSize.Y * ( value - Y_MIN ) ) / ( Y_MAX - Y_MIN );
      }
      else if ( type == 1 && code == 330 )
      {
        if ( value && TouchState == 0 )
          TouchState = 1;
        else if ( !value && TouchState == 2 )
          TouchState = 3;
      }
    }
  }

<!--EndFragment-->

 

This what you meant?

by
It seems that you are using a version which already scales the touch coordinates. But that is not required for the official display. Can you please use the original main.c that is provided within our build environment and just adapt the input device to 'event3'?

Br,
Manuel
by
This is the one I recieved in the original?
by
Now I'm a little bit confused: From where did you get the build environment? Your reported functions are not the official ones...
by
Downloaded the one off the website along with the other two downloads
by

Can you please register at our website and download the package once more?

by
Have done, will re-add event3 and test
by
Successful. Thank you for your support.

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

...