All sorted now, got the touchscreen working correctly.
All I did is swapped order witch X and Y coordinates from touchscreen is read in UTouch.cpp
[[language]]
// If the panel is touched, return the coordinates in x and y and return true; else return false
bool UTouch::read(uint16_t &px, uint16_t &py, uint16_t * null rawX, uint16_t * null rawY)
{
bool ret = false;
if (!portIRQ.read()) // if screen is touched
{
portCS.setLow();
delay_us(100); // allow the screen to settle
uint16_t ty; // <- was tx
if (getTouchData(false, ty)) // <- was tx
{
uint16_t tx; // <- was ty
if (getTouchData(true, tx)) // <- was ty
Thank you David for nice add on to DuetWifi
Mark