您尚未登录。

楼主 #1 2019-10-22 19:58:09

smartcar
会员
注册时间: 2018-02-19
已发帖子: 735
积分: 735

F1C100s上, ts_calibrate/ts_test 均正常, 但是ZLG AWTK不能触摸, 请问这是为什么?

QQ图片20191022195534.jpg

TSLIB_TSDEVICE=/dev/input/event1 ts_calibrate

TSLIB_TSDEVICE=/dev/input/event1 ts_test

# TSLIB_TSDEVICE=/dev/input/event1 /awtk/bin/demoui
app_root_is_valid:43 app_root != NULL
try /root
try /awtk/bin
app_root=/awtk
fb_info_t: /dev/fb0
fb_info_t: xres=800 yres=480 bits_per_pixel=32 mem_size=1536000
fb_info_t: red(16 8) green(8 8) blue(0 8)
line_length=3200 mem_size=1536000 smem_len=1536000
xres_virtual =800 yres_virtual=480 xpanstep=1 ywrapstep=0
ratio=1.000000 800 480
Build at: Oct 22 2019 16:41:20
window preload open
tslib: Selected device is not a touchscreen (must support ABS event type)
tslib_dispatch_one_event:61 tslib read failed(ret=0, errno=0, filename=/dev/input/event0)
Print tslib: : Success
keyboard pointer down:3198 982
input_dispatch_one_event:71 mouse read failed(ret=-1, errno=0, fd=-1, filename=/dev/input/mice)
Print mouse: : Success
window system_bar open
main
ignore_user_input
window main open
window preload close
main
main
input_dispatch_one_event:71 mouse read failed(ret=-1, errno=2, fd=-1, filename=/dev/input/mice)
Print mouse: : No such file or directory
tslib: Selected device is not a touchscreen (must support ABS event type)
tslib_dispatch_one_event:61 tslib read failed(ret=0, errno=0, filename=/dev/input/event0)
Print tslib: : Success
input_dispatch_one_event:71 mouse read failed(ret=-1, errno=2, fd=-1, filename=/dev/input/mice)
Print mouse: : No such file or directory
tslib: Selected device is not a touchscreen (must support ABS event type)
tslib_dispatch_one_event:61 tslib read failed(ret=0, errno=0, filename=/dev/input/event0)
Print tslib: : Success
input_dispatch_one_event:71 mouse read failed(ret=-1, errno=2, fd=-1, filename=/dev/input/mice)
Print mouse: : No such file or directory
tslib: Selected device is not a touchscreen (must support ABS event type)
tslib_dispatch_one_event:61 tslib read failed(ret=0, errno=0, filename=/dev/input/event0)
Print tslib: : Success
input_dispatch_one_event:71 mouse read failed(ret=-1, errno=2, fd=-1, filename=/dev/input/mice)
Print mouse: : No such file or directory
tslib: Selected device is not a touchscreen (must support ABS event type)
tslib_dispatch_one_event:61 tslib read failed(ret=0, errno=0, filename=/dev/input/event0)
Print tslib: : Success
input_dispatch_one_event:71 mouse read failed(ret=-1, errno=2, fd=-1, filename=/dev/input/mice)
Print mouse: : No such file or directory
tslib: Selected device is not a touchscreen (must support ABS event type)
tslib_dispatch_one_event:61 tslib read failed(ret=0, errno=0, filename=/dev/input/event0)
Print tslib: : Success
input_dispatch_one_event:71 mouse read failed(ret=-1, errno=2, fd=-1, filename=/dev/input/mice)
Print mouse: : No such file or directory

tslib: Selected device is not a touchscreen (must support ABS event type)
tslib_dispatch_one_event:61 tslib read failed(ret=0, errno=0, filename=/dev/input/event0)
Print tslib: : Success


input_dispatch_one_event:71 mouse read failed(ret=-1, errno=2, fd=-1, filename=/dev/input/mice)
Print mouse: : No such file or directory
tslib: Selected device is not a touchscreen (must support ABS event type)
tslib_dispatch_one_event:61 tslib read failed(ret=0, errno=0, filename=/dev/input/event0)
Print tslib: : Success
keyboard pointer up:1148 641
keyboard pointer down:1439 531
keyboard pointer up:1441 530
keyboard pointer down:1488 468
keyboard pointer up:1488 477
keyboard pointer down:1452 523
input_dispatch_one_event:71 mouse read failed(ret=-1, errno=2, fd=-1, filename=/dev/input/mice)
Print mouse: : No such file or directory
tslib: Selected device is not a touchscreen (must support ABS event type)
tslib_dispatch_one_event:61 tslib read failed(ret=0, errno=0, filename=/dev/input/event0)
Print tslib: : Success
keyboard pointer up:1458 525
keyboard pointer down:1435 424
keyboard pointer up:1428 422
input_dispatch_one_event:71 mouse read failed(ret=-1, errno=2, fd=-1, filename=/dev/input/mice)
Print mouse: : No such file or directory
keyboard pointer down:1904 750
tslib: Selected device is not a touchscreen (must support ABS event type)
tslib_dispatch_one_event:61 tslib read failed(ret=0, errno=0, filename=/dev/input/event0)
Print tslib: : Success
keyboard pointer up:1908 734
input_dispatch_one_event:71 mouse read failed(ret=-1, errno=2, fd=-1, filename=/dev/input/mice)
Print mouse: : No such file or directory
tslib: Selected device is not a touchscreen (must support ABS event type)
tslib_dispatch_one_event:61 tslib read failed(ret=0, errno=0, filename=/dev/input/event0)
Print tslib: : Success
input_dispatch_one_event:71 mouse read failed(ret=-1, errno=2, fd=-1, filename=/dev/input/mice)
Print mouse: : No such file or directory
tslib: Selected device is not a touchscreen (must support ABS event type)
tslib_dispatch_one_event:61 tslib read failed(ret=0, errno=0, filename=/dev/input/event0)
Print tslib: : Success
input_dispatch_one_event:71 mouse read failed(ret=-1, errno=2, fd=-1, filename=/dev/input/mice)
Print mouse: : No such file or directory
tslib: Selected device is not a touchscreen (must support ABS event type)
tslib_dispatch_one_event:61 tslib read failed(ret=0, errno=0, filename=/dev/input/event0)
Print tslib: : Success

这里是按压触摸屏的输出:

Print tslib: : Success
keyboard pointer up:1148 641
keyboard pointer down:1439 531
keyboard pointer up:1441 530
keyboard pointer down:1488 468
keyboard pointer up:1488 477
keyboard pointer down:1452 523

但是实际上触摸是没有反应的.

请问这是为什么呢?

离线

楼主 #2 2019-10-22 20:57:24

smartcar
会员
注册时间: 2018-02-19
已发帖子: 735
积分: 735

Re: F1C100s上, ts_calibrate/ts_test 均正常, 但是ZLG AWTK不能触摸, 请问这是为什么?

找到问题了,  awtk 默认使用 /dev/input/event0 作为电阻触摸输入设备, 但是我的 event0 是键盘输入设备,

所以我先删除 event0, 然后把 event1 链接到 event0:

rm /dev/input/event0
ln /dev/input/event1 /dev/input/event0 -s

暂时性解决这个问题


现在问题来了, 能不能通过环境设置tslib 触摸的设备是 /dev/input/event1 ?
或者让程序自动去找合适的 abs 输入设备?

离线

楼主 #3 2019-10-22 21:03:37

smartcar
会员
注册时间: 2018-02-19
已发帖子: 735
积分: 735

Re: F1C100s上, ts_calibrate/ts_test 均正常, 但是ZLG AWTK不能触摸, 请问这是为什么?

还有, 请问我应该如何隐藏界面的光标(cursor)呢?

离线

楼主 #4 2019-10-22 21:14:45

smartcar
会员
注册时间: 2018-02-19
已发帖子: 735
积分: 735

Re: F1C100s上, ts_calibrate/ts_test 均正常, 但是ZLG AWTK不能触摸, 请问这是为什么?

电阻屏用 ts_test 测试一切正常, 但是 AWTK 运行的时候, 触摸笔按下不动, 整个界面都抖个不停.

离线

楼主 #5 2019-10-22 22:30:52

smartcar
会员
注册时间: 2018-02-19
已发帖子: 735
积分: 735

Re: F1C100s上, ts_calibrate/ts_test 均正常, 但是ZLG AWTK不能触摸, 请问这是为什么?

1. 看到这位兄弟 https://whycan.cn/t_2386.html#p25634 修改 c 文件,才想起要改 awtk-port/main_loop_linux.c

#define FB_DEVICE_FILENAME "/dev/fb0"
#define TS_DEVICE_FILENAME "/dev/input/event1"
#define KB_DEVICE_FILENAME "/dev/input/event0"

2. 改完后界面也不抖了.

3. 现在最后一个问题: 如何隐藏界面的光标(cursor)呢?

离线

#6 2019-10-23 08:39:51

Jmhh247
会员
注册时间: 2018-12-21
已发帖子: 262
积分: 262

Re: F1C100s上, ts_calibrate/ts_test 均正常, 但是ZLG AWTK不能触摸, 请问这是为什么?

顶起,呼叫作者

离线

#7 2019-10-23 11:05:40

lixianjing
会员
注册时间: 2019-04-25
已发帖子: 103
积分: 99.5

Re: F1C100s上, ts_calibrate/ts_test 均正常, 但是ZLG AWTK不能触摸, 请问这是为什么?

smartcar 说:

3. 现在最后一个问题: 如何隐藏界面的光标(cursor)呢?

谢谢大家支持,这个我还不知道,等我研究一下。

离线

#8 2019-10-24 11:29:23

lixianjing
会员
注册时间: 2019-04-25
已发帖子: 103
积分: 99.5

Re: F1C100s上, ts_calibrate/ts_test 均正常, 但是ZLG AWTK不能触摸, 请问这是为什么?

新版本隐藏了text cursor,麻烦更新一下awtk-linux-fb

离线

#9 2021-09-21 14:57:20

gsd_zcm
会员
注册时间: 2021-09-10
已发帖子: 6
积分: 3.5

Re: F1C100s上, ts_calibrate/ts_test 均正常, 但是ZLG AWTK不能触摸, 请问这是为什么?

请问前辈们,你们是用window下的awtk desinger生成的嘛,然后再到Ubuntu编译后移植到开发板上的吗?我在awtk desinger生成的文件有7M这么大,16M的spi flash根本不够用,主要是不知道怎么用desinger生成的代码移植到开发板上。

离线

页脚

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

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