libts/tslib

Further parameter in ts_calibrate / getxy() for more robust calibration/validation

svlstriker opened this issue · 1 comments

Hi @ all,
did you think about adding a further optional parameter to ts_calibrate / function getxy() ?
I thought about something like "min_samples", so that a minimal count of samples needs to be recognized within calibration (and maybe validation as well?).
By testing v1.22 of tslib, sometimes there are faulty touch-events on the touchscreen (could be because of old resistiv touchscreen). This could generate a faulty calibration and let validations fail more often.
If there is a minimal count of 'samples' needed for calibration / validation, these faulty-events could be ignored and would not take big effect to the calculated, touched point.

These 'min_samples' could have a default value given and overridden by another optional parameter within terminal calls.

What do you think about that?

that's a good idea in general, but not so easy.
1st: some touchscreens (firmware) doesn't send multiple (or many) sample when "tapping".
2nd: I think ts_calibrate has to rely on the input to be correct. It creates it's filtering from the raw input. Try not to let endusers to the calibration, but create a known-good one and resue it, maybe. Verify what's going on by watching evtest maybe, while doing the calibration.