Newhaven Display Forum

Newhaven Products => Evaluation Tools => Topic started by: Arnie on December 14, 2017, 02:30:15 AM

Title: NHD-7.0CTP-CAPE use touch screen in portrait mode?
Post by: Arnie on December 14, 2017, 02:30:15 AM
Greetings,

I have here NHD-7.0CTP-CAPE with BeagleBone Black and the Ubuntu 14.03-3.8 image up and running ok. I can rotate the display in xorg.conf.d ebdev.conf to portrait mode, but the touchscreen is not rotated. This is regardless of the options set in xorg.conf.d evdev.conf. What could be wrong here?

evdev.conf:

Section "InputClass"
        Identifier "evdev touchscreen catchall"
        MatchIsTouchscreen "on"
        MatchDevicePath "/dev/input/event*"
        Driver "evdev"
#        Option "Rotate" "CCW"
#        Option "InvX"
#        Option "InvY"
#        Option "SwapAxes" "true"
#        Option "InvertX" "true"
#        Option "InvertY" "true"
#        Option "GrabDevice" "true"
EndSection

Title: Re: NHD-7.0CTP-CAPE use touch screen in portrait mode?
Post by: mhall on January 24, 2018, 02:08:05 AM
Hi Arnie,

Running Debian 9.1 on BB Black , I found the same as you. But if you add the TransformatinMatrix option it does rotate the Touch.
I found this solution in the past for the RPi3.  This transformation works well for CW rotation.
 
For BeagleBone TourchScreen rotation : add or change this 40-libinput.conf file (/usr/share/X11/xorg.conf.d/40-....)

Section "InputClass"
        Identifier "libinput touchscreen catchall"
        MatchIsTouchscreen "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
#       Option "SwapAxes" "true"
#       Option "RotationAngle" "90.0"
        Option "TransformationMatrix" "0 1 0 -1 0 1 0 0 1"
EndSection

Hope it helps.