Today I dived deeper into the problem and to calibrate a test pattern, I put on the screens.
lcd.DrawLine(0, 32, 240-1, 32, FEZ_Components.FEZTouch.Color.Black);
lcd.DrawLine(24, 0, 24, 320-1, FEZ_Components.FEZTouch.Color.Black);
lcd.FillRectangle(24-4 ,32-4 , 8, 8, FEZ_Components.FEZTouch.Color.Magneta);
lcd.DrawLine(0, 288, 239, 288, FEZ_Components.FEZTouch.Color.Black);
lcd.DrawLine(216, 0, 216, 320-1, FEZ_Components.FEZTouch.Color.Black);
lcd.FillRectangle(216-4, 288-4, 8, 8, FEZ_Components.FEZTouch.Color.Magneta);
lcd.DrawLine(0, 160, 240-1, 160, FEZ_Components.FEZTouch.Color.Black);
lcd.DrawLine(120, 0, 120, 320-1, FEZ_Components.FEZTouch.Color.Black);
lcd.FillRectangle(120- 4, 160- 4, 8, 8, FEZ_Components.FEZTouch.Color.Magneta);
Whereupon me what the problem became clearer.
The code I’ve adjusted a bit to make it easier to modify.
int xMin = 800;
int xMax = 3150;
int yMin = 968;
int yMax = 3340;
if (x > xMax)
x = xMax;
else if (x < xMin)
x = xMin;
if (y > yMax)
y = yMax;
else if (y < yMin)
y = yMin;
x = (xMax - x) * (240 - 1) / (xMax - xMin);
y = (yMax - y) * (320 - 1) / (yMax - yMin);
Debug.Print("xRaw=" + xRaw.ToString() + " yRaw=" + yRaw.ToString() + " x=" + x.ToString() + " y=" + y.ToString());
For a permanent calibration caliwaarden I would like to save, possibly in the registers of the display. Does anyone out there a place for?