-
Notifications
You must be signed in to change notification settings - Fork 222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
XPT2046 touch calculation #22
Comments
Hi nottledim, I'm having the similar issue with the XPT2046 touch calculations. Were you able to resolve it? Please let me know if you have found the solution to this issue. Thanks in advance! |
oh, gosh - yes and no. I got it to work well enough for what I wanted by
fiddling about. I don't think you could call it a resolution.
If I remember there was a problem with the mask used to select the position
value from the chip register.
I'll dig the code out tomorrow to remind myself and I'll also send it to you.
Dick
…On 7 June 2018 20:19:05 Sindhuja Narra ***@***.***> wrote:
Hi nottledim,
I'm having the similar issue with the XPT2046 touch calculations. Were you
able to resolve it? Please let me know if you have found the solution to
this issue.
Thanks in advance!
--
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
#22 (comment)
|
That would be great. Thanks a lot! |
I am experiencing the same issue, was anyone able to resolve the issue with the XPT2046 touch calculation? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm not having much success getting touch to work. There is one show stopper in TFT_read_touch in tft.c.
There is a test for (ybottom - ytop) <= 0 which is always true and so calculation is always abandoned.
The constant TP_CALY_XPT2046 = 122224794 === 0x749009A
Masking that value with 0x3FFF returns 0x009A - that's ybottom
Shifting TP_CALY right by 16 bits and masking with 0x3FFF returns 0x0749 - thats ytop.
It's a constant calculation so I'm puzzled that it's recomputed every reading. I'm not too sure what's intended.
The text was updated successfully, but these errors were encountered: