Skip to content

Conversation

@SeanDS
Copy link

@SeanDS SeanDS commented Apr 26, 2019

I had a weird issue with my TJCTM24028-SPI (cheap eBay touch screen + TFT) and this library. When touching the lower 25% of the screen, the XPTPaint program worked ok, but when going into the top 75% the lines jumped off the screen and were not where my finger was touching. I tracked down the cause (or, at least, the change that fixes this) to the calibration variables _cal_vi1 and _cal_vj1. These were previously set to uint16_t, but are used in a calibration operation involving int32_t numbers, potentially leading to overflow (as in my case). Changing these variables to int32_t fixes this overflow, and solves the problem on my screen with discontinuities.

The calibration variables _cal_vi1 and _cal_vj1 were uint16_t, but this led to overflow on my screen, making the
touch x-position jump from around 100 to 56,000 in the lower 25% of the screen. Changing these variables to int32_t
fixes this overflow.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant