PanGuBoard DevelopmentKit

The LCD interface (J9) of the PanGu development board supports capacitive (using the I2C bus) touch signal.
The function of the capacitive screen has been configured in the Linux system, and the LCD module can be connected.

Touch calibration for Weston systems

Add libinput to the /etc/xdg/weston/weston.ini configuration file on the PanGu development board.

# vi /etc/xdg/weston/weston.ini
 [...]
 [libinput]
 touchscreen_calibrator=true
 calibration_helper=/bin/echo
 [...]

Then restart the weston

# systemctl restart weston

List the current system's touch devices

# weston-touch-calibrator
could not load cursor 'dnd-move'
could not load cursor 'dnd-copy'
could not load cursor 'dnd-none'
device "/sys/devices/platform/soc/40013000.i2c/i2c-0/0-0038/input/input1/event1" - head "DPI-1"

Start the touch calibration, the parameter is the node file of the sysfs of the touch device

# weston-touch-calibrator /sys/devices/platform/soc/40012000.i2c/i2c-0/0-002a/input/input1/event1

At this point, four points will appear on the screen at a time. Each click will display a check mark, indicating that the verification is successful. If there is an error, an error message will be displayed on the command line.

 

Touch calibration for Qt system

 

Configuring touched environment variables

export TSLIB_CALIBFILE=/etc/pointercal
export TSLIB_CONSOLEDEVICE=none
export TSLIB_CONFFLLE=/etc/ts.conf
export TSLIB_TSDEVICE=/dev/input/event1
export TSLIB_TSEVENTTYPE=INPUT
export QT_QPA_EGLFS_TSLIB=1
export QT_QPA_EVDEV_MOUSE_PARAMETERS=/dev/input/event1
export QT_QPA_EGLFS_KMS_CONFIG=/usr/share/qt5/cursor.json
export QT_QPA_GENERIC_PLUGINS=tslib:/dev/input/event1,evdevmouse
export QT_QPA_EGLFS_DISABLE_INPUT=1

Perform touch calibration procedure

./tscalibrate

The LCD displays five coordinates, and when clicked, the calibration is displayed successfully.