selftests/hid: tablets: do not set invert when the eraser is used
authorBenjamin Tissoires <bentiss@kernel.org>
Wed, 6 Dec 2023 10:45:58 +0000 (11:45 +0100)
committerBenjamin Tissoires <bentiss@kernel.org>
Thu, 7 Dec 2023 08:52:03 +0000 (09:52 +0100)
Turns out that the chart from Microsoft is not exactly what I got here:
when the rubber is used, and is touching the surface, invert can (should)
be set to 0...

[0] https://learn.microsoft.com/en-us/windows-hardware/design/component-guidelines/windows-pen-states

Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Jiri Kosina <jkosina@suse.com>
Link: https://lore.kernel.org/r/20231206-wip-selftests-v2-7-c0350c2f5986@kernel.org
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
tools/testing/selftests/hid/tests/test_tablet.py

index 27260dc02cc4d0f836d6f5ec769b5a0158443494..cb3955bf0ec58b82292c4aadd9f2ff3406a4c9fb 100644 (file)
@@ -382,7 +382,7 @@ class PenDigitizer(base.UHIDTestDevice):
         elif state == PenState.PEN_IS_ERASING:
             pen.tipswitch = False
             pen.inrange = True
-            pen.invert = True
+            pen.invert = False
             pen.eraser = True
 
         pen.current_state = state