Lines Matching +full:10 +full:base +full:- +full:t1
2 # SPDX-License-Identifier: GPL-2.0
3 # -*- coding: utf-8 -*-
9 from .base import application_matches
10 from .base import KernelModule
44 for x in range(-32000, 32000, 4000):
52 # to inverse calibration, followed by calibration by hid-sony.
53 assert x - 1 <= value <= x + 1
55 for y in range(-32000, 32000, 4000):
62 assert y - 1 <= value <= y + 1
64 for z in range(-32000, 32000, 4000):
71 assert z - 1 <= value <= z + 1
77 for rx in range(-2000000, 2000000, 200000):
84 # Sensor internal value is 16-bit, but calibrated is 22-bit, so
85 # 6-bit (64) difference, so allow a range of +/- 64.
86 assert rx - 64 <= value <= rx + 64
88 for ry in range(-2000000, 2000000, 200000):
95 assert ry - 64 <= value <= ry + 64
97 for rz in range(-2000000, 2000000, 200000):
104 assert rz - 64 <= value <= rz + 64
111 # DS4 capacity levels are in increments of 10.
113 for i in range(5, 105, 10):
159 assert evdev.slots[0][libevdev.EV_ABS.ABS_MT_TRACKING_ID] == -1
171 t1 = PSTouchPoint(2, 150, 200)
182 assert evdev.slots[1][libevdev.EV_ABS.ABS_MT_TRACKING_ID] == -1
184 r = uhdev.event(touch=[t0, t1])
193 libevdev.InputEvent(libevdev.EV_ABS.ABS_MT_POSITION_Y, 10) not in events
203 r = uhdev.event(touch=[t0, t1])
206 assert evdev.slots[0][libevdev.EV_ABS.ABS_MT_TRACKING_ID] == -1
211 t1.tipswitch = False
212 r = uhdev.event(touch=[t1])
216 assert evdev.slots[0][libevdev.EV_ABS.ABS_MT_TRACKING_ID] == -1
217 assert evdev.slots[1][libevdev.EV_ABS.ABS_MT_TRACKING_ID] == -1
234 while self.uhdev.dispatch(10):
242 idx = int(k[-1]) - 1
246 self.uhdev.dispatch(10)
250 self.uhdev.dispatch(10)
259 # as dumped from hid-sony 'ds4_get_calibration_data'.
262 # so we can have tests passing even if hid-tools doesn't have the
265 "x": {"bias": -73, "numer": 16384, "denom": 16472},
266 "y": {"bias": -352, "numer": 16384, "denom": 16344},
303 # as dumped from hid-playstation 'dualsense_get_calibration_data'.
306 # so we can have tests passing even if hid-tools doesn't have the
310 "y": {"bias": -114, "numer": 16384, "denom": 16362},