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
43 for x in range(-32000, 32000, 4000):
51 # to inverse calibration, followed by calibration by hid-sony.
52 assert x - 1 <= value <= x + 1
54 for y in range(-32000, 32000, 4000):
61 assert y - 1 <= value <= y + 1
63 for z in range(-32000, 32000, 4000):
70 assert z - 1 <= value <= z + 1
76 for rx in range(-2000000, 2000000, 200000):
83 # Sensor internal value is 16-bit, but calibrated is 22-bit, so
84 # 6-bit (64) difference, so allow a range of +/- 64.
85 assert rx - 64 <= value <= rx + 64
87 for ry in range(-2000000, 2000000, 200000):
94 assert ry - 64 <= value <= ry + 64
96 for rz in range(-2000000, 2000000, 200000):
103 assert rz - 64 <= value <= rz + 64
110 # DS4 capacity levels are in increments of 10.
112 for i in range(5, 105, 10):
158 assert evdev.slots[0][libevdev.EV_ABS.ABS_MT_TRACKING_ID] == -1
170 t1 = PSTouchPoint(2, 150, 200)
181 assert evdev.slots[1][libevdev.EV_ABS.ABS_MT_TRACKING_ID] == -1
183 r = uhdev.event(touch=[t0, t1])
192 libevdev.InputEvent(libevdev.EV_ABS.ABS_MT_POSITION_Y, 10) not in events
202 r = uhdev.event(touch=[t0, t1])
205 assert evdev.slots[0][libevdev.EV_ABS.ABS_MT_TRACKING_ID] == -1
210 t1.tipswitch = False
211 r = uhdev.event(touch=[t1])
215 assert evdev.slots[0][libevdev.EV_ABS.ABS_MT_TRACKING_ID] == -1
216 assert evdev.slots[1][libevdev.EV_ABS.ABS_MT_TRACKING_ID] == -1
233 while self.uhdev.dispatch(10):
241 idx = int(k[-1]) - 1
245 self.uhdev.dispatch(10)
249 self.uhdev.dispatch(10)
258 # as dumped from hid-sony 'ds4_get_calibration_data'.
261 # so we can have tests passing even if hid-tools doesn't have the
264 "x": {"bias": -73, "numer": 16384, "denom": 16472},
265 "y": {"bias": -352, "numer": 16384, "denom": 16344},
302 # as dumped from hid-playstation 'dualsense_get_calibration_data'.
305 # so we can have tests passing even if hid-tools doesn't have the
309 "y": {"bias": -114, "numer": 16384, "denom": 16362},