[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20231206-wip-selftests-v2-8-c0350c2f5986@kernel.org>
Date: Wed, 06 Dec 2023 11:45:59 +0100
From: Benjamin Tissoires <bentiss@...nel.org>
To: Jiri Kosina <jikos@...nel.org>,
Benjamin Tissoires <benjamin.tissoires@...hat.com>,
Shuah Khan <shuah@...nel.org>,
Peter Hutterer <peter.hutterer@...-t.net>
Cc: linux-input@...r.kernel.org, linux-kselftest@...r.kernel.org,
linux-kernel@...r.kernel.org,
Benjamin Tissoires <bentiss@...nel.org>
Subject: [PATCH v2 08/15] selftests/hid: tablets: set initial data for
tilt/twist
Avoids getting a null event when these usages are set
Reviewed-by: Peter Hutterer <peter.hutterer@...-t.net>
Signed-off-by: Benjamin Tissoires <bentiss@...nel.org>
---
no changes in v2
---
tools/testing/selftests/hid/tests/test_tablet.py | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/tools/testing/selftests/hid/tests/test_tablet.py b/tools/testing/selftests/hid/tests/test_tablet.py
index cb3955bf0ec5..0ddf82695ed9 100644
--- a/tools/testing/selftests/hid/tests/test_tablet.py
+++ b/tools/testing/selftests/hid/tests/test_tablet.py
@@ -276,9 +276,9 @@ class Pen(object):
self.barrelswitch = False
self.invert = False
self.eraser = False
- self.x_tilt = 0
- self.y_tilt = 0
- self.twist = 0
+ self.xtilt = 1
+ self.ytilt = 1
+ self.twist = 1
self._old_values = None
self.current_state = None
@@ -292,8 +292,8 @@ class Pen(object):
"width",
"height",
"twist",
- "x_tilt",
- "y_tilt",
+ "xtilt",
+ "ytilt",
]:
setattr(self, i, getattr(self._old_values, i))
@@ -361,8 +361,8 @@ class PenDigitizer(base.UHIDTestDevice):
pen.height = 0
pen.invert = False
pen.eraser = False
- pen.x_tilt = 0
- pen.y_tilt = 0
+ pen.xtilt = 0
+ pen.ytilt = 0
pen.twist = 0
elif state == PenState.PEN_IS_IN_RANGE:
pen.tipswitch = False
--
2.41.0
Powered by blists - more mailing lists