nanogui: touchscreen calibration
Subject:
Re: [nanogui] touchscreen calibration
From:
Jordan Crouse ####@####.####
Date:
11 Mar 2002 19:03:08 -0000
Message-Id: <1015872861.18726.204.camel@cosmic>
On Mon, 2002-03-11 at 11:43, Alex Holden wrote:
> Jordan Crouse wrote:
> > Right now, the whole touchscreen world is in limbo, awaiting the
> > decisions of the kernel maintainers.
>
> Remember that even after Linux moves to the new input model we'll still
> need to support touchscreen devices on older linux kernels and other
> operating systems.
Right. But by passing the calibration data to the drivers and letting
them deal with it, we don't have to worry about that from an engine
standpoint.
> > interface with a standard Microwindows API for calibration. Because
> > calibration can differ from system to system, I wonder if we have have a
> > new hook in the input driver for setting calibration data (coupled with
>
> What information do drivers need to know other than the minimum and
> maximum x and y values, whether to swap the x and/or y axes, and what
> pressure value to use as the "click" threshold?
That information should be passed to the driver, but each driver will
handle its calibration a bit differently (for example, the Ipaq still
uses a kernel calibration), so the engine would be better served if it
called a:
(driverptr)->set_calibration(minx, maxx, miny, maxy, swapx, swapy,
click)
that would then handle any implementation specific nastiness. But no,
the minimum and maximum X and Y values, a Z threshold and a X and Y swap
are all we need in terms of data.
The only other thing that may be nice to do is to send a GR_MOUSE_EVENT
when the calibration data is changed. That way, programs that care can
be informed (not that I know why a program would care, but maybe it does
its own scaling or something).
Jordan