kodi 17.3 touchscreen
#1
i am trying to get the touchscreen to work for the life of me in kodi 17.3 on a raspberry pi 3 running raspbian pixel.....   my main goal is to run CarPC but its useless if touch is not working.... touch works wonders in desktop but not in kodi Sad i am new to all this....

my specs are:
1. raspberry pi 3
2. raspbian pixel 11-25-16 i think
3. 5 inch elecrow RPA05010R  touchscreen
4. kodi 17.3
Reply
#2
I was able to get this working a while ago, with this same screen no less.
the issue i found with most instructions was that they were for calibrating under X, where kodi needs its own calibration.
I'll see if i can find more details on what i did tonight and post them here.

the main reason i no longer have this set up was because gestures of any kind didn't work, so scrolling etc was a real pain.
Reply
#3
to load the touchscreen driver you need to add the following to the /boot/config.txt:
Code:
hdmi_force_hotplug=1
hdmi_group=2
hdmi_mode=87
hdmi_cvt 800 480 60 6 0 0 0
dtoverlay=ads7846,cs=1,penirq=25,penirq_pull=2,speed=50000,keep_vref_on=0,swapxy=0,pmax=255,xohms=150,xmin=200,xmax=3900,ymin=200,ymax=3900
display_rotate=0
to make the touch work i had to create the advancedsettings.xml file with the following contents:
<advancedsettings>
    <touchscreen>
        <x_offset>-50</x_offset> <!-- set pixel x offset to align it to the used display-->
        <y_offset>-50</y_offset> <!-- set pixel y offset to align it to the used display-->
        <x_stretch_factor>0.216392</x_stretch_factor> <!-- stretch/compress the touch x axis-->
        <y_stretch_factor>0.132523</y_stretch_factor> <!-- stretch/compress the touch y axis-->
    </touchscreen>
</advancedsettings>

adding a mouse.xml to the keymaps folder with the following contents is also beneficial:
<keymap>
    <global>
        <mouse>
            <leftclick>leftclick</leftclick>
            <rightclick>rightclick</rightclick>
            <middleclick>middleclick</middleclick>
            <doubleclick id="0">noop</doubleclick>
            <longclick id="0">contextmenu</longclick>
            <wheeldown>wheeldown</wheeldown>
            <wheelup>wheelup</wheelup>
            <mousedrag>mousedrag</mousedrag>
            <mousedragend>leftclick</mousedragend>
            <mousemove>noop</mousemove>
        </mouse>
    </global>
</keymap>

if your screen is calibrated differently you can work out the factors for kodi by taking the min and max values for each axis in the config.txt file, eg:
xmin=200,xmax=3900,ymin=200,ymax=3900
the resolution:
W=800, H=480

xstretch=W/(xmax-xmin)
xoffset=xmin*xstretch
y​​​​​​xstretch=H/(ymax-ymin)
yoffset=ymin*ystretch
Reply



Logout Mark Read Team Forum Stats Members Help
kodi 17.3 touchscreen0
This forum uses Lukasz Tkacz MyBB addons.