it's working

Daniel Stone daniel at fooishbar.org
Wed Sep 3 13:56:51 PDT 2008


On Wed, Sep 03, 2008 at 01:36:11PM -0400, Chuck Robey wrote:
> I have my tablet now working, but I;m fairly certain that I have the values to
> the  InitValuatorAxisStruct function all wrong ... my problem is, the parameter
> names just aren't clear to me, there's no comments, and no docs I can see, and
> the other drivers all seem to use it differently.  I have my driver working, but
> I am nearly certain it's not "right", so it won't interoperate with other things
> as it should.
> 
> If anyone has any info on how that function's parameters should be used, I'd
> really appreciate a comment or two.  I'm now handling scaling by doing it myself
>  before I dispatch the events.

min_val is the minimum value you will ever hand it, and max_val is the
maximum value you will ever post for that valuator.  So, if you have a
1920x1200 screen, and you have min_val = 0 and max_val = 100 for both
x and y, posting (10, 20) will be converted to (192, 240) in screen
space.

resolution, min_resolution and max_resolution are, IIRC, physical
values: units per metre.  So, if you have a 1m x 1m tablet with a
resolution of 1000, then your min_val is 0, and max_val is 1000
for both x and y.

What's the actual problem you're having? If this doesn't work for you,
please email back (preferably with actual code samples), describing
what you think your min_val and max_val are, what you're posting, the
end result you get, and what you think it should be.

If you haven't knocked one up already,
http://people.freedesktop.org/~daniels/xiread.c (and the trivial
http://people.freedesktop.org/~daniels/devicemod.c, which should really
be extended to cover DeviceClassChangeNotify events) might be useful to
you too.

Cheers,
Daniel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.x.org/archives/xorg/attachments/20080903/0242647c/attachment.pgp>


More information about the xorg mailing list