Modifications

Sauter à la navigation Sauter à la recherche
505 octets ajoutés ,  16 décembre 2013 à 16:22
Ligne 10 : Ligne 10 :     
== 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 24 :  
{{ADFImage|RASP-PiTFT-Soft-Touch-01.png|480px}}
 
{{ADFImage|RASP-PiTFT-Soft-Touch-01.png|480px}}
   −
Remove and re-install the touchscreen with
+
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 40 :  
{{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.  
+
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 46 :  
{{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
+
OK commençons maintenant le processus de calibration! Vous n'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}}
Ligne 56 : Ligne 58 :  
{{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}}
29 917

modifications

Menu de navigation