summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2024-01-16 17:12:31 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2024-01-22 01:21:29 +0000
commit8603584e3335b5c3754ca559fab9d99809a91844 (patch)
tree1df0b7c78d7b1aa835b8089e8fa8cb010cbe912a
parentc5f808ac2e74fbcfbdbf04e8ee7d79cba155b1a0 (diff)
test: set pressure to zero on proxout for the tablets with forced prox out
If a test goes past the tip-down threshold, the proximity timeout does not trigger. And one can spend a long time trying to debug why the test fails... As far as I vaguely remember, these devices' pressure values are correct enough, it's just the lack of BTN_TOOL_PEN that is the issue so instead of a proper proximity out, we just send enough data to set the pressure to below the tip threshold.
-rw-r--r--test/litest-device-aiptek-tablet.c6
-rw-r--r--test/litest-device-huion-pentablet.c7
-rw-r--r--test/litest-device-uclogic-tablet.c7
3 files changed, 20 insertions, 0 deletions
diff --git a/test/litest-device-aiptek-tablet.c b/test/litest-device-aiptek-tablet.c
index f066a1ca..7e55d7de 100644
--- a/test/litest-device-aiptek-tablet.c
+++ b/test/litest-device-aiptek-tablet.c
@@ -38,6 +38,12 @@ static struct input_event proximity_in[] = {
};
static struct input_event proximity_out[] = {
+ /* This tablet doesn't report BTN_TOOL_PEN 0 on proximity out but I *think*
+ * it still reports pressure values of zero? Who knows, we'd have to
+ * get our hands on the tablet again. Meanwhile, let's force the
+ * pressure to zero at least so other tests don't have to guess.
+ */
+ { .type = EV_ABS, .code = ABS_PRESSURE, .value = 0 },
{ .type = EV_SYN, .code = SYN_REPORT, .value = 0 },
{ .type = -1, .code = -1 },
};
diff --git a/test/litest-device-huion-pentablet.c b/test/litest-device-huion-pentablet.c
index 8e81bc15..0002dcee 100644
--- a/test/litest-device-huion-pentablet.c
+++ b/test/litest-device-huion-pentablet.c
@@ -36,6 +36,13 @@ static struct input_event proximity_in[] = {
};
static struct input_event proximity_out[] = {
+ /* This tablet doesn't report BTN_TOOL_PEN 0 on proximity out but I *think*
+ * it still reports pressure values of zero? Who knows, we'd have to
+ * get our hands on the tablet again. Meanwhile, let's force the
+ * pressure to zero at least so other tests don't have to guess.
+ */
+ { .type = EV_ABS, .code = ABS_PRESSURE, .value = 0 },
+ { .type = EV_SYN, .code = SYN_REPORT, .value = 0 },
{ .type = -1, .code = -1 },
};
diff --git a/test/litest-device-uclogic-tablet.c b/test/litest-device-uclogic-tablet.c
index f9773add..026995bd 100644
--- a/test/litest-device-uclogic-tablet.c
+++ b/test/litest-device-uclogic-tablet.c
@@ -35,6 +35,13 @@ static struct input_event proximity_in[] = {
};
static struct input_event proximity_out[] = {
+ /* This tablet doesn't report BTN_TOOL_PEN 0 on proximity out but I *think*
+ * it still reports pressure values of zero? Who knows, we'd have to
+ * get our hands on the tablet again. Meanwhile, let's force the
+ * pressure to zero at least so other tests don't have to guess.
+ */
+ { .type = EV_ABS, .code = ABS_PRESSURE, .value = 0 },
+ { .type = EV_SYN, .code = SYN_REPORT, .value = 0 },
{ .type = -1, .code = -1 },
};