-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 24/08/10 10:26, Ping Cheng wrote:
>
> Thank you Mike for looking into the details.
>
Hiya Ping, thanks very much for getting back to me. 5:)
>
> The code was:
>
> rw = data[7] & 0x04 ? (data[7] & 0x03)-4 : (data[7] & 0x03);
> wacom_report_rel(wcombo, REL_WHEEL, -rw);
>
> it is changed to:
>
> rw = (signed)(data[7] & 0x04) - (data[7] & 0x03);
> input_report_rel(input, REL_WHEEL, rw);
>
> I guess they should report the same value? I don't have a graphire to test
> with.
>
I looked at that code too and tried to figure it out, and from what I
can tell the two calculations do add up to the same results. The only
difference I could see from the patch was that further down, the old
code sent the following (in the switch features->type, case WACOM_G4, if
data[7] & 0xf8):
wacom_report_rel(wcombo, REL_WHEEL, 0);
wacom_report_key(wcombo, BTN_TOOL_FINGER, 0);
while the new code sends (both for data[7] & 0xf8 and for wacom->id[1])
rw = ((data[7] & 0x18) >> 3) - ((data[7] & 0x20) >> 3);
wacom_report_rel(wcombo, REL_WHEEL, rw);
wacom_report_key(wcombo, BTN_TOOL_FINGER, 0xf0);
Would that have affect the buttons returned? I couldn't see any
difference between calls using BTN_4 or BTN_5 which is where I expected
to see the problem...
>
> What was going on? I am not sure (I am not kidding :). I guess we
> wanted to simplify the logical?
>
It looks like there was a lot of duplicated code, so the cleanup
should've been fine, but given the lines above, I'm not sure they work
identically. The problem is, I don't know which of the calls is
important and which isn't, so I can't easily produce a fix myself.
I'm happy to try out patches against whichever kernel version you'd like?
Mike 5:)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (GNU/Linux)
iEYEARECAAYFAkxzttoACgkQu7rWomwgFXoXlgCdG7rxYeTZ3+a1WGPfYUkvdRhA
2lQAoK5V58wYMaJBeERppBruL38COmLY
=1E/g
-----END PGP SIGNATURE-----
------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users
worldwide. Take advantage of special opportunities to increase revenue and
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
Linuxwacom-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel