AnsweredAssumed Answered

LCD TS_State.touchDetected x,y problem

Question asked by jendoubi saif ddine on Apr 15, 2018

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 ?

Outcomes