您尚未登录。

楼主 # 2023-04-06 10:25:02

jkl
会员
注册时间: 2019-11-18
已发帖子: 263
积分: 146.5

tslib 校准电阻触摸屏,出现下面问题!!!

请问一下,电阻触摸屏,使用tslib校准后,查阅到可以通过ts_uinput 命令虚拟出一个event设备,应用层就直接可以通过这个设备来获取坐标了,不知道是否可行?使用后出现下面log:
root@TinaLinux:/# ts_uinput -n /dev/input/event1
tslib: WARNING: no multitouch using VARIANCE filter
open /dev/uinput: No such file or directory
Illegal instruction

是不行?还是我应该在系统层面去生成一个/dev/uinput 设备,这需要打开哪项配置?
麻烦各位大佬支支招

离线

楼主 #2 2023-04-06 14:18:38

jkl
会员
注册时间: 2019-11-18
已发帖子: 263
积分: 146.5

Re: tslib 校准电阻触摸屏,出现下面问题!!!

你好,配置已经打开,目前现象是:
ts_uinput 生成的设备event1没有报点,原本驱动设备event0报点正常。
这可能是什么原因?

离线

楼主 #3 2023-04-06 14:19:06

jkl
会员
注册时间: 2019-11-18
已发帖子: 263
积分: 146.5

Re: tslib 校准电阻触摸屏,出现下面问题!!!

root@TinaLinux:/# export TSLIB_CALIBFILE=/etc/pointercal;export TSLIB_CONFFILE=/
etc/ts.conf;export TSLIB_PLUGINDIR=/usr/lib/ts;export TSLIB_CONSOLEDEVICE=none;e
xport TSLIB_FBDEVICE=/dev/fb0;export TSLIB_TSDEVICE=/dev/input/event0;
root@TinaLinux:/#
root@TinaLinux:/#
root@TinaLinux:/#
root@TinaLinux:/# ts_calibrate
xres = 480, yres = 272
Took 15 samples...
Top left : X = 3495 Y = 3300
Took 11 samples...
Top right : X =  557 Y = 3183
Took 11 samples...
Bot right : X =  609 Y =  823
Took 13 samples...
Bot left : X = 3489 Y =  935
Took 14 samples...
Center : X = 2013 Y = 2048
507.976929 -0.130559 -0.001265
279.929535 0.002867 -0.072775
Calibration constants: 33290776 -8556 -82 18345462 187 -4769 65536
root@TinaLinux:/#
root@TinaLinux:/#
root@TinaLinux:/# ts_test
94.175296:    459    237    255
94.175296:    459    237    255
94.185553:    458    237    255
94.195795:    458    237    255
94.206035:    457    238    255
94.216333:    457    239    255
94.226508:    457    239    255
94.236740:    457    240    255
94.246991:    458    240    255
94.350075:    458    239      0
94.773312:    440     93    255
94.773312:    440     93    255
94.783571:    441     92    255
94.890074:    439     91      0
^Csignal 2 caught
root@TinaLinux:/#
root@TinaLinux:/# TSLIB_TSDEVICE=/dev/input/event0 ts_uinput &
root@TinaLinux:/# tslib: WARNING: no multitouch using VARIANCE filinput: ts_uinput as /devices/virtual/input/input1
ter
tslib: WARNING: no multitouch using VARIANCE filter

root@TinaLinux:/#
root@TinaLinux:/#
root@TinaLinux:/# TSLIB_TSDEVICE=/dev/input/event1 ts_test
^Csignal 2 caught
root@TinaLinux:/#

root@TinaLinux:/etc# ./evtest
No device specified, trying to scan all of /dev/input/event*
Available devices:
/dev/input/event0:      1c24800.sun3i-rtp
/dev/input/event1:      ts_uinput
Select the device event number [0-1]: 1
Input driver version is 1.0.1
Input device ID: bus 0x6 vendor 0x0 product 0x0 version 0x0
Input device name: "ts_uinput"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 330 (BTN_TOUCH)
  Event type 3 (EV_ABS)
    Event code 48 (ABS_MT_TOUCH_MAJOR)
      Value      0
      Min        0
      Max     1000
    Event code 53 (ABS_MT_POSITION_X)
      Value      0
      Min        0
      Max      479
    Event code 54 (ABS_MT_POSITION_Y)
      Value      0
      Min        0
      Max      271
Properties:
Testing ... (interrupt to exit)
^Croot@TinaLinux:/etc#

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn