Modifications

Sauter à la navigation Sauter à la recherche
4 078 octets ajoutés ,  19 juin 2016 à 19:42
Ligne 2 : Ligne 2 :     
== Présentation ==
 
== Présentation ==
 +
{{ambox-stop|text=Si vous avez téléchargé l'image 'Easy Install' proposée par AdaFruit (ou utilisé le script) alors cette étape n'est pas nécessaire. Elle est déjà réalisée! Cette partie du tutoriel est destiné aux utilisateurs avancés qui désire savoir comment configurer et adapter l'écran tactile.}}
 +
    
{{ADFImage|RASP-PiTFT-01.jpg|480px}}
 
{{ADFImage|RASP-PiTFT-01.jpg|480px}}
Ligne 10 : Ligne 12 :     
== Configurer la partie tactile ==
 
== Configurer la partie tactile ==
Now that the screen is working nicely, we'll take care of the touchscreen. There's just a bit of calibration to do, but it isn't hard at all.
+
Maintenant que nous avons un écran qui fonctionne correctement, nous allons pouvoir nous pencher sur la partie tactile. Il y a un peu de calibration à réaliser mais ce n'est vraiment pas difficile.
   −
Before we start, we'll make a '''udev''' rule for the touchscreen. That's because the '''eventX''' name of the device will change a lot and its annoying to figure out what its called depending on whether you have a keyboard or other mouse installed.
+
Avant de commencer, nous allons créer une règle '''udev''' pour l'écran tactile (''touchscreen'' en anglais). C'est parce que le nom du périphérique '''eventX''' change de façon importante et qu'il est ennuyant de deviner ce qu'il est appelé en fonction du matériel installé (clavier ou souris).
   −
Run
+
Exécutez
    
  <nowiki>sudo nano /etc/udev/rules.d/95-stmpe.rules</nowiki>
 
  <nowiki>sudo nano /etc/udev/rules.d/95-stmpe.rules</nowiki>
   −
to create a new '''udev''' file and copy & paste the following line in:
+
pour créer un nouveau fichier '''udev''' et copiez/collez la ligne suivante dedans:
    
  <nowiki>SUBSYSTEM=="input", ATTRS{name}=="stmpe-ts", ENV{DEVNAME}=="*event*", SYMLINK+="input/touchscreen"</nowiki>  
 
  <nowiki>SUBSYSTEM=="input", ATTRS{name}=="stmpe-ts", ENV{DEVNAME}=="*event*", SYMLINK+="input/touchscreen"</nowiki>  
Ligne 24 : Ligne 26 :  
{{ADFImage|RASP-PiTFT-Soft-Touch-01.png|480px}}
 
{{ADFImage|RASP-PiTFT-Soft-Touch-01.png|480px}}
   −
Remove and re-install the touchscreen with
+
'''Truc & Astuce:''' Pour controler nano, il faut utiliser des séquence de commande. Par exemple, '''^X''' signifie Contrôle+X que vous obtenez en pressant simultanément les touches "Contrôle/CTRL" et X.
 +
 
 +
Désactivez et re-installez l'écran tactile à l'aide de
    
  <nowiki>sudo rmmod stmpe_ts; sudo modprobe stmpe_ts</nowiki>
 
  <nowiki>sudo rmmod stmpe_ts; sudo modprobe stmpe_ts</nowiki>
   −
Then type '''ls -l /dev/input touchscreen'''
+
Tapez ensuite '''ls -l /dev/input touchscreen'''
   −
It should point to '''eventX''' where X is some number, that number will be different on different setups since other keyboards/mice/USB devices will take up an event slot
+
Il devrait pointer vers '''eventX''' X représente un nombre, ce nombre varie d'une installation à l'autre et dépend du nombre de périphériques installés (clavier/souris/usb) et utilisant eux aussi des "entrée" d’évènement (''event slot'').
    
{{ADFImage|RASP-PiTFT-Soft-Touch-02.png|480px}}
 
{{ADFImage|RASP-PiTFT-Soft-Touch-02.png|480px}}
   −
There are some tools we can use to calibrate & debug the touchscreen. Install the "event test" and "touchscreen library" packages with
+
Il existe quelques outils permettant de calibrer et déboguer des écrans tactiles. Installez les paquets de "test d’évènement" et "bibliothèque tactile" à l'aide de:
    
  <nowiki>sudo apt-get install evtest tslib libts-bin</nowiki>
 
  <nowiki>sudo apt-get install evtest tslib libts-bin</nowiki>
Ligne 40 : Ligne 44 :  
{{ADFImage|RASP-PiTFT-Soft-Touch-03.png|480px}}
 
{{ADFImage|RASP-PiTFT-Soft-Touch-03.png|480px}}
   −
Now you can use some tools such as sudo evtest '''/dev/input/touchscreen''' which will let you see touchscreen events in real time, press on the touchscreen to see the reports.  
+
== Executer evtext ==
 +
 
 +
Vous disposer maintenant de quelques outils comme '''sudo evtest /dev/input/touchscreen''' vous permettant de voir les évènement tactiles en temps réel. Touchez votre écran pour voir les informations retournées par evtest.  
    
{{ADFImage|RASP-PiTFT-Soft-Touch-04a.png|480px}}
 
{{ADFImage|RASP-PiTFT-Soft-Touch-04a.png|480px}}
Ligne 46 : Ligne 52 :  
{{ADFImage|RASP-PiTFT-Soft-Touch-04b.png|480px}}
 
{{ADFImage|RASP-PiTFT-Soft-Touch-04b.png|480px}}
   −
OK lets start the calibration process! 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
+
== Calibration automagique ==
 +
Si vous faite une rotation de l'écran alors is sera nécessaire de recalibrer la partie tactile pour qu'il fonctionne avec la nouvelle orientation de l'écran. Vous pouvez utiliser le processus de calibration manuelle décrite dans la section ci-dessous, ou vous pouvez exécuter une petit script Python fixera automatiquement la calibration par défaut en fonction de l'orientation de l'écran.
 +
 
 +
Cet outil (''helper'') est automatiquement installé pour vous mais vous pouvez en [https://raw.githubusercontent.com/adafruit/PiTFT_Extras/master/pitft_touch_cal.py lire le code ici sur GitHub].
 +
 
 +
Executez le à partir d'une ligne de commande à l'aide de
 +
 
 +
sudo adafruit-pitft-touch-cal
 +
 
 +
Il va essyer de détecter le type d'écran installé et la rotation configurée.
 +
 
 +
{{ADFImage|RASP-PiTFT-Soft-Touch-04c.png}}
 +
 
 +
Par défaut, le script va essayer de lire l'orientation de l'écran en examinant la configuration du module PiTFT avec modprobe. Si le script peut lire l'orientation, il l'affichera sur l'écran, ainsi que les valeurs de calibration actuelles et pour finir les nouvelles valeurs de calibration bésée sur l'orientation de l'écran. Le script vous demande une confirmation avant de faire une mise-à-jour des valeurs de calibration. Pressez '''y''' (''Y' pour ''Yes'') puis la touche retour clavier pour confirmer.
 +
 
 +
{{ADFImage|RASP-PiTFT-Soft-Touch-04d.png}}
 +
 
 +
Essayez d'utiliser ce script de calibration pour faciliter la calibration de l'écran tactile. Notez que les valeurs de calibration pourrait ne pas correspondre exactement à votre écran, mais suffisamment pour répondre à vos besoins. Si vous avez besoin d'une calibration plus précise, suivez les étapes de la section suivante pour calibrer manuelle votre écran.
 +
 
 +
== Calibration manuelle ==
 +
Si la calibration "automarique" ne convient pas OU si vous avez besoin d'une calibration plus fine ALORS vous pouvez effectuer une calibration manuelle.
 +
 
 +
Vous aurez besoin d'effectuer cette tâche qu'une seule fois.
 +
 
 +
Tapez la commande suivante pour commencer la calibration
    
  <nowiki>sudo TSLIB_FBDEVICE=/dev/fb1 TSLIB_TSDEVICE=/dev/input/touchscreen ts_calibrate</nowiki>
 
  <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!
+
Suivez les instructions affichées sur l'écran en touchant chaque point. Utiliser un stylet pour disposer d'une plus grande précision. <font color="red">N'utilisez surtout pas du métal, uniquement du plastique!</font>
 +
 
 +
{{ADFImage|RASP-PiTFT-Soft-Touch-05a.png}}
   −
{{ADFImage|RASP-PiTFT-Soft-Touch-05a.png|480px}}
+
{{ambox-stop|text=Au cours du processus, vous devriez voir 5 cibles. Si vous en voyez moins, l'écran tactile à probablement généré de multiples signaux pour un simple touché... et vous devriez ressayer une nouvelle calibration.}}
    
{{ADFImage|RASP-PiTFT-Soft-Touch-05b.png|480px}}
 
{{ADFImage|RASP-PiTFT-Soft-Touch-05b.png|480px}}
   −
Next you can run 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!
+
Vous pouvez ensuite exécuter la commande
 +
 
 +
'''sudo TSLIB_FBDEVICE=/dev/fb1 TSLIB_TSDEVICE=/dev/input/touchscreen ts_test'''  
 +
 
 +
qui vous permettra de réaliser un test graphique en réalisant un dessin avec l'écran tactile.
 +
 
 +
Vous pouvez redémarrer la phase de calibration si vous trouvez que la précision de l'écran est insuffisante.
 +
 
 +
{{ADFImage|RASP-PiTFT-Soft-Touch-06.png}}
   −
{{ADFImage|RASP-PiTFT-Soft-Touch-06.png|480px}}
+
== Calibration X Serveur ==
   −
== Calibration X ==
+
Vous pouvez également calibrer le système d'entrée X serveur (''X input system'') mais vous devez utiliser un programme différent qui s'appelle '''xinput_calibrator'''
   −
You can also calibrate the X input system but you have to use a different program called '''xinput_calibrator'''
+
Vous pouvez effectuer cette opération sur la calibration de l'écran n'atteind pas vos attentes ou à chaque fois que vous changez le paramètre '''rotate=XX''' du module TFT. L'écran tactile ne fait pas une rotation automatique lorsque vous changez la rotation de l'écran... en effet, le pilote de l'écran est totalement séparé du pilote tactile.
   −
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
+
Vous devez normalement compiler le programme mais AdaFruit a eu l'excellente idée de préparer des paquets prêt à l'emploi.
   −
Normally you'd have to compile it but we have a ready to go package for you so run:
+
Exécutez les commandes suivantes:
   −
  <nowiki>wget http://adafruit-download.s3.amazonaws.com/xinput-calibrator_0.7.5-1_armhf.deb
+
  <nowiki>sudo apt-get install -y xinput-calibrator</nowiki>
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
+
{{ADFImage|RASP-PiTFT-Soft-Touch-10a.png}}
 +
 
 +
Vous devez effacer les anciennes données de calibration avant de démarrer xinput_calibrator. Il faut donc exécuter la commandes suivantes:
    
  <nowiki>sudo rm /etc/X11/xorg.conf.d/99-calibration.conf</nowiki>
 
  <nowiki>sudo rm /etc/X11/xorg.conf.d/99-calibration.conf</nowiki>
   −
Before running '''startx''' and the calibrator - otherwise it gets really confused!
+
Avant de démarrer '''startx''' et le programme de calibration - sinon les choses risque d'être vraiment confuse!
   −
Now you'll have to run the xcalibrator while also running X. You can do this by startx and then opening up the terminal program and running the '''xinput_calibrator''' command OR you can do what we do which is run startx in a SSH/Terminal shell and then run the xinput_calibrator in the X window, which requires the following command order:  
+
Maintenant, vous aurez besoin d'exécuter xcalibrator pendant que X Serveur fonctionne. Vous pouvez atteindre ce but en exécutant '''startx''' et en ouvrant un terminal pour exécuter '''xinput_calibrator'''. Ou vous pouvez aussi réaliser ce que nous faisons, c'est a dire démarrer '''startx''' depuis SSH/Terminal et exécuter ensuite '''xinput_calibrator''' dans X window, ce qui peut être réaliser l'aide de la série de commandes suivantes:  
 
   
 
   
 
  <nowiki>FRAMEBUFFER=/dev/fb1 startx &
 
  <nowiki>FRAMEBUFFER=/dev/fb1 startx &
 
DISPLAY=:0.0 xinput_calibrator</nowiki>
 
DISPLAY=:0.0 xinput_calibrator</nowiki>
   −
Follow the directions on screen
+
Suivez ensuite les instructions visibles à l'écran.
    
{{ADFImage|RASP-PiTFT-Soft-Touch-10.png}}
 
{{ADFImage|RASP-PiTFT-Soft-Touch-10.png}}
   −
Once complete you'll get something like:
+
Une fois terminé, vous devriez obtenir un résultat comme celui-ci:
    
{{ADFImage|RASP-PiTFT-Soft-Touch-11.png|480px}}
 
{{ADFImage|RASP-PiTFT-Soft-Touch-11.png|480px}}
   −
Run '''sudo nano /etc/X11/xorg.conf.d/99-calibration.conf''' and copy the
+
Exécutez la commande '''sudo nano /etc/X11/xorg.conf.d/99-calibration.conf''' et copiez le contenu suivant avec les information retournée par le processus de calibration.
    
  <nowiki>Section "InputClass"
 
  <nowiki>Section "InputClass"
Ligne 99 : Ligne 140 :  
EndSection</nowiki>
 
EndSection</nowiki>
   −
or whatever you got, into there. You can quit X if you want by typing '''fg''' to bring that command into the foreground, and then CONTROLE-C to quit.
+
Vous pouvez quitter X en tapant la commande '''fg''' (pour ''foreground'') afin de ramener la commande en premier plan, puis presser la combinaison de touche CONTROLE-C pour quitter.
 +
 
 +
'''En fonction de la 'rotation' de l'écran, lorsque vous faites cette calibration, vous pourriez avoir besoin de mettre la partie SwapAxes en commentaire avec un # et/ou interchanger les chiffres comme ci-dessous''':
 +
 
 +
Option "Calibration" "119 3736 3850 174"
 +
 
 +
vers
 +
 
 +
Option "Calibration" "3736 119 174 3850"
   −
Your touchscreen is now super calibrated, hurrah!  
+
Hourra! Votre écran est maintenant super calibré!
    
{{RASP-PiTFT-TRAILER}}
 
{{RASP-PiTFT-TRAILER}}
29 917

modifications

Menu de navigation