cancel
Showing results for 
Search instead for 
Did you mean: 

LCD TS_State.touchDetected x,y problem

jendoubi saif ddine
Associate III
Posted on April 15, 2018 at 18:38

so i was simply trying to test a touche in a specifique spot like this : 

if(TS_State.touchDetected)

{

/* Get X and Y position of the touch post calibrated */

x = TS_State.touchX[0];

y = TS_State.touchY[0];

radius = TS_State.touchWeight[0]/3;

LCD_UsrLog (' %d %d \r\n',x,y);

if ((y > (45)) &&

(y < (51)))

{

if ((x > (430)) &&

(x < (435)))

{

LCD_UsrLog (' Fi blasetha \r\n');

}}

}

but it seems that it can't compare them to the numbers i used, but when i use the code from the example it works fine so _ i had to add or subb to get where i want, is there a better way ?

_ and if i click is keeps counting is it possible to count only one touche ?

0 REPLIES 0