Posts by Henne

    Finaly... I've got a solution. see below. I'll explain what I've tried before.

    Because the touch works, but the data was wrong, I took the image of Waveshare here: Waveshare 5inch HDMI LCD

    then configured everything under X11 and got an interesting result 99-calibration.conf after install:

    Code
    Section "InputClass"
            Identifier      "calibration"
            MatchProduct    "ADS7846 Touchscreen"
            Option  "Calibration"   "208 3905 288 3910"
            Option  "SwapAxes"      "0"
    EndSection

    The basic setup was quite good with these parameters in the config.txt at the image from waveshare,

    Code
    dtparam=i2c_arm=on
    dtparam=spi=on
    enable_uart=1
    
    hdmi_group=2
    hdmi_mode=1
    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

    but I had to calibrate so that I could use the touch exactly.

    The values of the calibration may be informative. This is 99-calibration.conf after first calibration:

    Funny thing is that with each calibration different values have come and I could bring it at least with four attempts to no exact functioning touch. Other results of calibration:

    I thought to use these values above in a config file for service.touchscreen/pointercal, but since I have none and their structure does not know, I have rejected that.

    Back to the Libreelec I took the config.txt settings from the image of Waveshare and then tried again with the advancedsettings.xml.

    Now it has worked so far successful that I have a perfectly calibrated touch under Kodi. The calibration from the addon still does not work because of the offset.

    This is the config.txt:

    and this the advancedsettings.xml I found these parameters here: Waveshare 5 Inch Touchscreen funktioniert unter Kodi nicht richtig

    Code
    <advancedsettings>
      <touchscreen>
        <x_offset>-32</x_offset>
        <y_offset>-35</y_offset>
        <x_stretch_factor>0.209</x_stretch_factor>
        <y_stretch_factor>0.131</y_stretch_factor>
      </touchscreen>
    </advancedsettings>

    If you get me the structure of the pointercal of you, I can test it, whether it works without advancedsettings.xml.

    Thanks again for your support vpeter!

    And if you tap somewhere else on the screen then it moves to next point?

    Or it stays on first point indefinitely?

    Don't do anything. Just get the first point and nothing else.

    Just while the screensaver in Kodi is working, any touch at the display brings Kodi on.

    This says to me: Touch sends data

    OK, with the fresh installation only with waveshare and touchservice i get with evtest this:

    /event2 the Waveshare but also event3 ? I'm confused!

    This is the config.txt

    Everything is the same as before. Don't be able to calibrate.

    Run calibration and tap on those points.

    but I ca'nt do that, because the touch does not react to the first point. Neither in Kodi, nor with selected calibration before the start of Kodi

    I make another very fresh installation and try again.

    Thank you again for your support!

    with "orientation is off" I do not quite understand how I can change that. You do not mean xyswap?

    I have made a video, so you can see how shifted is the touch sensitivity to the display

    External Content youtu.be
    Content embedded from external sources will not be displayed without your consent.
    Through the activation of external content, you agree that personal data may be transferred to third party platforms. We have provided more information on this in our privacy policy.

    and systemctl status service.touchscreen.service

    while evtest whith shutting down KODI will provide touchdata like this:

    Code
    Event: time 1521898950.552704, -------------- SYN_REPORT ------------
    Event: time 1521898950.562717, type 3 (EV_ABS), code 0 (ABS_X), value 987
    Event: time 1521898950.562717, type 3 (EV_ABS), code 1 (ABS_Y), value 2411
    Event: time 1521898950.562717, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 64902

    I now have some data of the touch:

    Code
    110, 3960 (x) 300, 3800 (y)

    and i've tried the advancedsettings.xml advancedsettings.xml - Official Kodi Wiki, but stretch_factor don't work. Even tested

    Code
    <window>
        <width>800</width>
        <height>460</height>
    </window>

    don't do anything. I am unsure if the advancedsettings.xml is working, path /storage/.kodi/userdata/ and XML with NotePad++

    (i.e. splash false does not work)

    Hello,

    Thanks for all the information here, so I could almost completely put my 5 "Waveshare touch display into operation.

    I document what I had to do to make it work:

    In the config.txt I have these entries for the display:

    Code
    hdmi_force_hotplug = 1
    max_usb_current = 1
    hdmi_group = 2
    hdmi_mode = 87
    hdmi_cvt = 800 480 60 6 0 0 0
    
    dtparam = spi = on
    dtparam = i2c_arm = on
    dtoverlay = ADS7846, penirq = 25, speed = 10000, keep_vref_on = 0, penirq_pull = 2, xohms = 150

    In the ts_env.sh

    Code
    TOUCHSCREEN_NAME = "ADS7846 Touchscreen"

    The ts.conf is copied from the ts.conf-waveshare.

    However, I have a problem with the calibration: In the calibration screen I do not come with the pointer to the measuring point, because there is an offset about half the diagonal of the display.

    The calibration screen shows: Resolution 800x480 skin 1280x720

    tvservice -s

    provides

    Code
    state 0x120006 [DVI DMT (87) RGB full 15: 9], 800x480 @ 59.00Hz, progressive

    I can move the mouse pointer, but I can not reach the point.

    I suspect that the sizing of the display in the settings must be adjusted, but does not know where.

    The same is mentioned here: XPT2046 Touch Screen instructions for Raspbery Pi 3 - Page 2 - Raspberry Pi Forums

    Thanks for any help

    Henry