2010/1/3 Przemysław Firszt <[email protected]>:
> Dnia 2009-12-31, czw o godzinie 20:30 -0800, Ping pisze:
>> However, since you are on this page and you feel comfortable to simply
>> the code, can you "cook" something more for us?  Can you make a
>> routine to cover all the tables so we can get rid of this file and
>> move the routine to wcmCommon.c (or another reasonale file as you
>> wished :)?
>
> Please check out attached file and let me know if the function is good
> enough to replace the hardcoded data. I've some idaes how to improve the
> match between hardcoded data and the family of functions (if that's the
> name for a function with parameters), but I don't want to make it too
> complicated if it's not necessary.

Is f(x) = a (x - b), with different a and b, the function that you
used to create the graph?

The tables we see in the code is for 1/8 (0 to 45 degrees) of the
whole range of the values.  The whole tilt to rotation translation is
on a 360 degree base, which we made them into 1800 values, with an
incremental of 2 of each movement.

The actual rotation used in the driver is defined in xf86Wacom.c for
cursor and stylus with rotation supported.  The value is from -900 to
899, which covers 1800 values.

So, I think, I am not exactly sure though:

1.   the new function should cover all 360 degrees instead of 45;
2.   there should be a trigonometric function (the sine, cosine, or
tangent) involved.

> Some comments:
> 1. there should be a condition added to cap returned angle to 45
> 2. what is range of ds->rotation?
>        This piece of code (wcmTilt2R function) suggests that it's up to
> 1800:
>
>        /* Intuos4 mouse has an (180-5) offset */
>        ds->rotation = ((360 - ds->rotation + 180 - 5) % 360) * 5;
>
> Using real numbers generated by the funcion instead of hardcoded integer
> values would give us smoother curve; final ds->rotation value would be
> integer anyway, but with more "fine grained" values. Is it worth to do
> it or it's something that user cannot notice?
>
> Please ignore point 2 if it's not clear for you.

I will not ignore any point especially when it is not clear to me :).
Quite a stubburn person, uh?

Ping

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Linuxwacom-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to