Go Down

Topic: New UTFT Lib (Read 4 times) previous topic - next topic

Magicj



Has anyone successfully used the calibration sketch on a 3.2WD screen  - I am having no luck in getting it to work correctly. When I run subsequently run the Quick Draw example I get a mirror image on the long axis.


Orientation problem, easy to fix by changing the orientation value to fit your needs :)


I gather you mean to change the orientation of the screen and/or touch panel to either Portrait or Landscape in the initialisation??

I have tried all different combinations with different/ but still incorrect, results.

Docedison

#11
Dec 07, 2012, 06:59 am Last Edit: Dec 07, 2012, 07:30 am by Docedison Reason: 1
The ITDB802 Touch Lib initializes the touch orientation to portrait and the UTFT Lib initializes to landscape as defaults
From the UTFT Header file:
#define PORTRAIT 0
#define LANDSCAPE 1   // this is the default mode, set it to 0 for Portrait
The same applies to the ITDB802 Touch
From the touch header file:
InitTouch(byte orientation = PORTRAIT);  //Set it to 1 for landscape...
So flipping the value to 0 of either the touch init or the UTFT init will give correct results.
Touch init(1) is Landscape with the default UTFTinit
UTFTinit(0)is Portrait with the default Touchinit.I do hope this helps.

Bob
--> WA7EMS <--
"The solution of every problem is another problem." -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard

Markus_L811




Has anyone successfully used the calibration sketch on a 3.2WD screen  - I am having no luck in getting it to work correctly. When I run subsequently run the Quick Draw example I get a mirror image on the long axis.


Orientation problem, easy to fix by changing the orientation value to fit your needs :)


I gather you mean to change the orientation of the screen and/or touch panel to either Portrait or Landscape in the initialisation??

I have tried all different combinations with different/ but still incorrect, results.

You need to do the calibration Sketch first and edit then the UTouchCD.h

or alternativ test mine I have the same panel.

Markus

Magicj

I am happy to report that I now have this working.

Thanks to Bob and Markus for your reply's.

I had been working with the previous Touch library for some time and assumed that the new calibration was meant to be run in Portrait mode, for both Touch and Screen.

Henning kindly provided the results for his 3.2WD screen which worked perfectly which left only one option - I was doing something wrong  :smiley-red:. After some more experimentation I have found that the Calibration sketch works with the LCD in Landscape mode and the Touch in Portrait mode.

Now to start writing some sketches.

Have a great Christmas everyone.

doc_norway


...the Calibration sketch works with the LCD in Landscape mode and the Touch in Portrait mode.


This is not entirely correct. The LCD always operates in Landscape mode in the calibration, but the touch screen operates in its own default orientation. For most display modules this will be Portrait, but not all modules are the same. This is described in the UTouch manual, and the correct orientation for all officially supported modules are also listed in the documentation.

/Henning

Go Up