Modifications

Sauter à la navigation Sauter à la recherche
3 402 octets ajoutés ,  13 juillet 2015 à 11:39
Ligne 58 : Ligne 58 :     
{{ADFImage|RASP-PiTFT-PLUS-Touch-20.png|640px}}
 
{{ADFImage|RASP-PiTFT-PLUS-Touch-20.png|640px}}
 +
 +
By default the script will attempt to read the screen orientation by examining the PiTFT module configuration with modprobe. If the script can read the orientation it will print out the current orientation, the current touchscreen calibration values, and the new touchscreen calibration values baesd on the current orientation. Before updating the calibration the script will ask you to confirm that you'd like to make the change. Press y and enter to confirm.
 +
 +
{{ADFImage|RASP-PiTFT-PLUS-Touch-21.png|640px}}
 +
 +
Try using this default calibration script to easily calibrate your touchscreen display. Note that the calibration values might not be exactly right for your display, but they should be close enough for most needs. If you need the most accurate touchscreen calibration, follow the steps in the next section to manually calibrate the touchscreen.
 +
 +
== Calibration Manuelle ==
 +
If you rotate the display you have some other setup where you need to carefully calibrate you can do it 'manually'
 +
 +
You will want to calibrate the screen once but shouldn't have to do it more than that. We'll begin by calibrating on the command line by running
 +
 +
<nowiki>sudo TSLIB_FBDEVICE=/dev/fb1 TSLIB_TSDEVICE=/dev/input/touchscreen ts_calibrate</nowiki>
 +
 +
follow the directions on the screen, touching each point. Using a stylus is suggested so you get a precise touch. Don't use something metal, plastic only!
 +
 +
{{ADFImage|RASP-PiTFT-PLUS-Touch-30.png|640px}}
 +
 +
{{ambox-stop|text=You should see five crosshair targets. If you see less than that, the touchscreen probably generated multiple signals for a single touch, and you should try calibrating again.}}
 +
 +
{{ADFImage|RASP-PiTFT-PLUS-Touch-31.png|640px}}
 +
 +
Next you can run {{fname|sudo TSLIB_FBDEVICE=/dev/fb1 TSLIB_TSDEVICE=/dev/input/touchscreen ts_test}} which will let you draw-test the touch screen. Go back and re-calibrate if you feel the screen isn't precise enough!
 +
 +
{{ADFImage|RASP-PiTFT-PLUS-Touch-32.png|640px}}
 +
 +
== Calibration X ==
 +
You can also calibrate the X input system but you have to use a different program called '''xinput_calibrator'''.
 +
 +
You can do this if the calibration on the screen isnt to your liking or any time you change the '''rotate=XX''' module settings for the screen. Since the screen and touch driver are completely separated, the touchscreen doesn't auto-rotate
 +
 +
Normally you'd have to compile it but we have a ready to go package for you so run:
 +
 +
<nowiki>wget http://adafruit-download.s3.amazonaws.com/xinput-calibrator_0.7.5-1_armhf.deb
 +
sudo dpkg -i -B xinput-calibrator_0.7.5-1_armhf.deb</nowiki>
 +
 +
Before you start the xinput_calibrator you will need to delete the old calibration data so run
 +
 +
<nowiki>sudo rm /etc/X11/xorg.conf.d/99-calibration.conf</nowiki>
 +
 +
Before running {{fname|startx}} and the calibrator - otherwise it gets really confused!
 +
Now you'll have to run the xcalibrator while also running X. You can do this by {{fname|startx}} and then opening up the terminal program and running the {{fname|xinput_calibrator}} command (which is challenging to do on such a small screen) OR you can do what we do which is run startx in a SSH/Terminal shell and then run the xinput_calibrator from the same shell, which requires the following command order:
 +
 +
<nowiki>FRAMEBUFFER=/dev/fb1 startx &
 +
DISPLAY=:0.0 xinput_calibrator</nowiki>
 +
 +
Follow the directions on screen:
 +
 +
{{ADFImage|RASP-PiTFT-PLUS-Touch-40.png}}
    
{{RASP-PiTFT-PLUS-TRAILER}}
 
{{RASP-PiTFT-PLUS-TRAILER}}
29 917

modifications

Menu de navigation