lvgl / lv_drivers

TFT and touch pad drivers for LVGL embedded GUI library
https://docs.lvgl.io/master/porting/index.html
MIT License
306 stars 314 forks source link

error while compiling lv_port_linux_frame_buffer with EVDEV_CALIBRATE enabled #136

Closed JefkeB closed 3 years ago

JefkeB commented 3 years ago

Hi,

when compiling the mentioned project for a rPi project with a touchscreen that needs to be scaled I get following error 2x

 error: ‘drv->disp->driver’ is a pointer

to solve this i have changed lines (from 215) in evdev.c from

    data->point.x = map(evdev_root_x, EVDEV_HOR_MIN, EVDEV_HOR_MAX, 0, drv->disp->driver.hor_res);
    data->point.y = map(evdev_root_y, EVDEV_VER_MIN, EVDEV_VER_MAX, 0, drv->disp->driver.ver_res);

to

    data->point.x = map(evdev_root_x, EVDEV_HOR_MIN, EVDEV_HOR_MAX, 0, drv->disp->driver->hor_res);
    data->point.y = map(evdev_root_y, EVDEV_VER_MIN, EVDEV_VER_MAX, 0, drv->disp->driver->ver_res);

tried to create a pull request but was unable to do this from the lv_port_linux_frame_buffer project as lv_drivers is a submodule and i do not yet know how to do this.

thanks for your nice library Jef

embeddedt commented 3 years ago

Thank you; I've just fixed it as you suggested.