Thread (4 messages) 4 messages, 3 authors, 2008-11-15

Re: [patch] add module parameter to provide hardware-calibrated coordinate data for MicroTouch/3M touchscreens

From: Vojtech Pavlik <hidden>
Date: 2008-11-15 21:09:19

On Fri, Nov 14, 2008 at 04:46:08PM -0500, Dan Streetman wrote:
Ok - I'll update the patch to invert Y before reporting.

On the issue of whether to use a module param to send raw coordinates
or hw-calibrated coordinates, or to just change the code to report the
hw-calibrated coordinates instead of the raw coordinates, what do you
think?
I'm in favor for the option, because of:

	* backwards compatibility 
	* the Linux input standard is unprocessed coordinate data
	  (but after compensating for all hardware quirks)
	* most touchscreens can't do HW calibration anyway, and we
	  benefit from common SW calibration code, eg in tslib

Actually, I don't see much value in the hw-calibrated data, but I see it
could be useful in some cases, so I'm still fine with adding the
possibility to use that mode.

Vojtech
On Fri, Nov 14, 2008 at 4:31 PM, Vojtech Pavlik [off-list ref] wrote:
quoted
On Thu, Nov 13, 2008 at 03:22:52PM -0500, Dan Streetman wrote:
quoted
Note that the Y axis is inverted as reported by the touchscreen, so
this reverses the Y min and max (0xffff for the min, 0 for the max).
This works fine on my system using the X evdev driver.
quoted
+     // Default min/max xy are the raw values, override if using hw-calib
+     if (hwcalib_xy) {
+             input_set_abs_params(usbtouch->input, ABS_X, 0, 0xffff, 0, 0);
+             input_set_abs_params(usbtouch->input, ABS_Y, 0xffff, 0, 0, 0);
While it does work with the X evdev, please don't do it, and instead do
the inversion before reporting ABS_Y. Linux input devices should follow
the (USB) HID specification of axis direction and stick to it. The
behaviour with reversed min/max is undefined.

--
Vojtech Pavlik
Director SuSE Labs
-- 
Vojtech Pavlik
Director SuSE Labs
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help