Hardware Reference
In-Depth Information
The touchscreen in this example is an “eGalax Inc.” touchscreen, so the event device
is event1 . Edit ts_calib.sh with your favorite text editor, and change the TSLIB_TSDE
VICE line to reflect the proper event device. For the setup in this example, it should look
like this:
export TSLIB_TSDEVICE=/dev/input/event1
Save it to disk, and then run it (as root):
$ sudo sh ./ts_calib.sh
xres = 1280, yres = 720
The touchscreen display should flash, then display a calibration screen with a cross-
hair. Carefully tap the crosshair with the included stylus (or, if you've already lost the
stylus, the tip of a click pen with the ink tip not pushed out). It will move around the
screen to all four corners, then to the center. When you finish, it will print the calibration
values out to the terminal, and the calibration is done.
Now you need to use uinput-mapper to map the touchscreen input to an input device
that xbmc finds friendlier. To be specific, it lets you map specific touch behaviors to
various mouse click types. Download the software and the configuration, and install
it into the /scripts directory:
$ wget --no-check -O uimapper.tar.gz "https://docs.google.com/uc?
export=download&id=0B4lrG9aRe-8Malg2VkM0YW1CT28"
$ wget --no-check -O uimapper.conf "https://docs.google.com/uc?
export=download&id=0B4lrG9aRe-8MM2RIWFh1WjJWUW8"
$ sudo mkdir -p /scripts
$ sudo tar -xf uimapper.tar.gz -C /scripts
Edit uimapper.conf with your favorite text editor, and correct the UIMAPPER_DEV line to
reflect the event device you found earlier:
env UIMAPPER_DEV="/dev/input/event1"
Save out the file, and move it (as root) into position inside /etc/init . This will allow
uinput-mapper to start when the RaspBMC instance boots:
$ sudo mv uimapper.conf /etc/init
You need to tweak the internal uinput_mapper configuration a bit before it will work
properly. Open /scripts/uinput_mapper/configs/touchscreen.py in a text editor (as
root) and change this line:
sres = subprocess.check_output("tvservice -s", shell=True)
to look like this:
sres = subprocess.check_output("/opt/vc/bin/tvservice -s", shell=True)
Search WWH ::




Custom Search