您尚未登录。

楼主 #1 2018-12-07 14:36:35

john78
会员
注册时间: 2018-07-19
已发帖子: 220
积分: 168

V3S littlevgl 触摸 问题

电阻屏NS2009
tslib OK,ts_calibrate,ts_test可以正常运行。
littlevgl demo可以正常显示,但是,触摸 错误输出“ input input1: Poll touch data failed: ”

    lv_indev_drv_t indev_drv;
     lv_indev_drv_init(&indev_drv);          /*Basic initialization*/
     evdev_init();
     indev_drv.type = LV_INDEV_TYPE_POINTER; /*See below.*/
     indev_drv.read =  evdev_read;            /*See below.*/
     lv_indev_drv_register(&indev_drv);      /*Register the driver in LittlevGL*/
。。。
/*Handle LitlevGL tasks (tickless mode)*/
    while(1) {
        lv_tick_inc(5);
        lv_task_handler();
        usleep(5000);
    }

哪里配置还有问题

/*-------------------------------------------------
* Mouse or touchpad as evdev interface (for Linux based systems)
*------------------------------------------------*/
#ifndef USE_EVDEV
#define USE_EVDEV           1
#endif
#if USE_EVDEV
#define EVDEV_NAME   "/dev/input/event1"        /*You can use the "evtest" Linux tool to get the list of devices and test them*/
#define EVDEV_SWAP_AXES         0               /*Swap the x and y axes of the touchscreen*/

#define EVDEV_SCALE             0               /* Scale input, e.g. if touchscreen resolution does not match display resolution */
#if EVDEV_SCALE
#define EVDEV_SCALE_HOR_RES     (800)     /* Horizontal resolution of touchscreen */
#define EVDEV_SCALE_VER_RES     (480)        /* Vertical resolution of touchscreen */
#endif  /*EVDEV_SCALE*/

#define EVDEV_CALIBRATE         0               /*Scale and offset the touchscreen coordinates by using maximum and minimum values for each axis*/
#if EVDEV_CALIBRATE
#define EVDEV_HOR_MIN   3800                    /*If EVDEV_XXX_MIN > EVDEV_XXX_MAX the XXX axis is automatically inverted*/
#define EVDEV_HOR_MAX   200
#define EVDEV_VER_MIN   200
#define EVDEV_VER_MAX   3800
#endif  /*EVDEV_SCALE*/
#endif  /*USE_EVDEV*/

最近编辑记录 john78 (2018-12-07 14:37:14)

离线

楼主 #3 2018-12-07 15:05:32

john78
会员
注册时间: 2018-07-19
已发帖子: 220
积分: 168

Re: V3S littlevgl 触摸 问题

但是触摸不对啊,和画面对不上?
另外,这个怎么使用 tslib校准好的数据? /dev/input/event1--这个输出已经校准了吗?

离线

楼主 #5 2018-12-07 15:17:28

john78
会员
注册时间: 2018-07-19
已发帖子: 220
积分: 168

Re: V3S littlevgl 触摸 问题

tslib OK,ts_calibrate,ts_test可以正常运行。

这个需要怎么在LitlevGL中调用?

离线

页脚

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

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