Pointer moves but widgets not activate

Hi, I’m running the LVGL for frame buffer device on my device.

I’ve changed the the lv_drv_conf.h to

 * Mouse or touchpad as evdev interface (for Linux based systems)
#ifndef USE_EVDEV
    #define USE_EVDEV 1
    #define USE_BSD_EVDEV 0
    #define EVDEV_NAME "/dev/input/event0"      /*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_CALIBRATE 0                   /*Scale and offset the touchscreen coordinates by using maximum and minimum values for each axis*/
    #if EVDEV_CALIBRATE #define EVDEV_HOR_MIN 0 /*to invert axis swap EVDEV_XXX_MIN by EVDEV_XXX_MAX*/
        #define EVDEV_HOR_MAX 4096                  /*"evtest" Linux tool can help to get the correct calibraion values>*/
        #define EVDEV_VER_MIN 0
        #define EVDEV_VER_MAX 4096
    #endif /*EVDEV_CALIBRATE*/
#endif /*USE_EVDEV*/

However when I use the touchscreen the pointer moves, but I’m not getting any movement in screen.

Anyone could help me with this?

Thanks ahead.

Well, no one answered, but I would like to share the solution I’ve found.

My touchpanel uses the controller gslX680. This one gives input type EV_ABS when the evtest is excecuted. This is the reading in tests in a touch event:

Event: time 1659454059.550540, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 1
Event: time 1659454059.550540, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 471
Event: time 1659454059.550540, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 288
Event: time 1659454059.550540, -------------- SYN_REPORT ------------
Event: time 1659454060.020398, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value -1
Event: time 1659454060.020398, -------------- SYN_REPORT ------------

However in the function evdev_read inside the evdev.c file is this conditional:

else if(in.code == ABS_MT_TRACKING_ID)
                        if(in.value == -1)
                            evdev_button = LV_INDEV_STATE_REL;
                        else if(in.value == 0)
                            evdev_button = LV_INDEV_STATE_PR;

So when the touch is pressed the ABS_MT_TRACKING_ID reads 1, but evdev_read function is waiting for a 0.

So, changed this:

@@ -124,7 +123,8 @@ void evdev_read(lv_indev_drv_t * drv, lv_indev_data_t * data)
evdev_root_y += in.value;
} else if(in.type == EV_ABS) {
-            if(in.code == ABS_X)
+           evdev_button = LV_INDEV_STATE_PR;
+           if(in.code == ABS_X)
evdev_root_y = in.value;

If a EV_ABS event ocurrs always will be a pressed event, unless its a release. :wink:

I hope that this can be useful, for someone.