diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2015-12-11 17:39:57 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2015-12-14 08:27:59 +1000 |
commit | 1a3440113751e039316de2db8b388fb83e2a2b99 (patch) | |
tree | eb07e8c3c5f96621f49545269899b362f3d16aa5 /test/litest-device-huion-pentablet.c | |
parent | 727d184230e6d02c8e6c3865ecaf7d92953bcd1a (diff) |
test: set default axis values for all tablet devices
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'test/litest-device-huion-pentablet.c')
-rw-r--r-- | test/litest-device-huion-pentablet.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/litest-device-huion-pentablet.c b/test/litest-device-huion-pentablet.c index 40093973..6be659b6 100644 --- a/test/litest-device-huion-pentablet.c +++ b/test/litest-device-huion-pentablet.c @@ -56,10 +56,24 @@ static struct input_event motion[] = { { .type = EV_SYN, .code = SYN_REPORT, .value = 0 }, { .type = -1, .code = -1 }, }; + +static int +get_axis_default(struct litest_device *d, unsigned int evcode, int32_t *value) +{ + switch (evcode) { + case ABS_PRESSURE: + *value = 100; + return 0; + } + return 1; +} + static struct litest_device_interface interface = { .tablet_proximity_in_events = proximity_in, .tablet_proximity_out_events = proximity_out, .tablet_motion_events = motion, + + .get_axis_default = get_axis_default, }; static struct input_absinfo absinfo[] = { |