Event input normalisation

Description

I have a number of touch screens, 7 and 10 inch versions.

Some of the 7 inch screens use 0 > 2000 as the touch areas whereas the 10 inch one and a 7 inch one has a 0 > 4000 touch area.

Instead of having to alter the lv_drv_conf.h file for each is there a way to normalise them to 0>2000?

I know I might be asking the question in the wrong place but I was hoping someone here might be able to answer the question.

Maybe I’m going about it the wrong way?

What MCU/Processor/Board and compiler are you using?

Raspberry Pi Zero/Zero2

What LVGL version are you using?

8.1

What do you want to achieve?

As described

What have you tried so far?

Altering the driver config for each screen

Code to reproduce

#  define EVDEV_CALIBRATE         1               /*Scale and offset the touchscreen coordinates by using maximum and minimum values for each axis*/

#  if EVDEV_CALIBRATE
#    define EVDEV_HOR_MIN         20               /*to invert axis swap EVDEV_XXX_MIN by EVDEV_XXX_MAX*/
#    define EVDEV_HOR_MAX      4000               /*"evtest" Linux tool can help to get the correct calibraion values>*/
#    define EVDEV_VER_MIN         20
#    define EVDEV_VER_MAX      4000
#  endif  /*EVDEV_CALIBRATE*/
#endif  /*USE_EVDEV*/

and

#  define EVDEV_CALIBRATE         1               /*Scale and offset the touchscreen coordinates by using maximum and minimum values for each axis*/

#  if EVDEV_CALIBRATE
#    define EVDEV_HOR_MIN         20               /*to invert axis swap EVDEV_XXX_MIN by EVDEV_XXX_MAX*/
#    define EVDEV_HOR_MAX      2000               /*"evtest" Linux tool can help to get the correct calibraion values>*/
#    define EVDEV_VER_MIN         20
#    define EVDEV_VER_MAX      2000
#  endif  /*EVDEV_CALIBRATE*/
#endif  /*USE_EVDEV*/

Screenshot and/or video

N/A