Re: touchscreen calibration again

From: Andrew Zabolotny <zap_at_homelink.ru>
Date: Tue, 18 May 2004 23:25:02 +0400

On Tue, 18 May 2004 10:48:53 +0200
Michael Opdenacker <zumbi3_at_free.fr> wrote:

> > A second order model is almost as good (3.7 and 2.2 pixels average
> > errors), and practical experiments are neeed to determine if 3rd order
> > is worth the extra CPU cycles:
> Right! We will have to see, for example with an on-screen drawing
> program. However, I don't think that 8 extra floating point
> multiplications will be too hard to handle...
Wh... wh... what??? floating-point? kidding? Floating point is a performance
killer on ARM, especially in the kernel! Every fp operation causes a exception
and a lot of overhead.

Use fixed-point math. With 16.16 fixed-point you'll get ~0.000015 accuracy,
and you can represent with 32 bits any number in the range 0.0-65535.9999.
With 14.18 fixed-point you'll get ~.000004 accuracy, and you can represent
with 32 bits any number in the range 0.0-16383.99999. I think this is quite
enough for touchscreen readings.

I can explain how to use fixed-point arithmetic, if somebody is interested.

--
Greetings,
   Andrew
Received on Wed May 19 2004 - 00:03:47 EDT

This archive was generated by hypermail 2.2.0 : Mon Jul 25 2005 - 17:19:27 EDT