You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The normalizeTsPoint-function is not working properly.
InTouchTest.ino I always wondered why you have to change back to "Waveshield.setRotation(0);"
Turns out the coordinates wouldn't fit if left at "Waveshield.setRotation(1);"
So the TouchTest.ino only works if you set your text horizontally at rotation = 1 and to draw you set back rotation = 0
And ONLY then it will work like this. Like you can't set rotation = 0, write vertical and then change to rotation = 1 to draw. The fillCircle-dots will be off-set and mirrored.
After some troubleshooting I found out normalizeTsPoint-function is the culprit. Please correct me if I'm wrong, I'm still learning. I changed the last part of the function to this:
int16_t t;
switch (rotation)
{
case 0:
break;
case 1:
t = p.y;
p.y = LCD_WIDTH - 1 - p.x;
p.x = t;
break;
The normalizeTsPoint-function is not working properly.
InTouchTest.ino I always wondered why you have to change back to "Waveshield.setRotation(0);"
Turns out the coordinates wouldn't fit if left at "Waveshield.setRotation(1);"
So the TouchTest.ino only works if you set your text horizontally at rotation = 1 and to draw you set back rotation = 0
And ONLY then it will work like this. Like you can't set rotation = 0, write vertical and then change to rotation = 1 to draw. The fillCircle-dots will be off-set and mirrored.
After some troubleshooting I found out normalizeTsPoint-function is the culprit. Please correct me if I'm wrong, I'm still learning. I changed the last part of the function to this:
int16_t t;
switch (rotation)
{
case 0:
break;
case 1:
t = p.y;
p.y = LCD_WIDTH - 1 - p.x;
p.x = t;
break;
case 2:
p.y = LCD_HEIGHT - 1 - p.y;
p.x = LCD_WIDTH - 1 - p.x;
break;
case 3:
t = p.y;
p.y = p.x;
p.x = LCD_HEIGHT - 1 - t;
break;
}
This solved the problem for me but I'm not sure if it is really solved or just superficial solved.
The text was updated successfully, but these errors were encountered: