Lines Matching +full:rx +full:- +full:slots
2 # SPDX-License-Identifier: GPL-2.0
3 # -*- coding: utf-8 -*-
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):
77 r = uhdev.event(gyro=(rx, None, None))
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
149 assert evdev.slots[0][libevdev.EV_ABS.ABS_MT_TRACKING_ID] == 0
150 assert evdev.slots[0][libevdev.EV_ABS.ABS_MT_POSITION_X] == 50
151 assert evdev.slots[0][libevdev.EV_ABS.ABS_MT_POSITION_Y] == 100
158 assert evdev.slots[0][libevdev.EV_ABS.ABS_MT_TRACKING_ID] == -1
161 """Send 2 touches in the first 2 slots.
178 assert evdev.slots[0][libevdev.EV_ABS.ABS_MT_TRACKING_ID] == 0
179 assert evdev.slots[0][libevdev.EV_ABS.ABS_MT_POSITION_X] == 50
180 assert evdev.slots[0][libevdev.EV_ABS.ABS_MT_POSITION_Y] == 100
181 assert evdev.slots[1][libevdev.EV_ABS.ABS_MT_TRACKING_ID] == -1
194 assert evdev.slots[0][libevdev.EV_ABS.ABS_MT_TRACKING_ID] == 0
195 assert evdev.slots[0][libevdev.EV_ABS.ABS_MT_POSITION_X] == 50
196 assert evdev.slots[0][libevdev.EV_ABS.ABS_MT_POSITION_Y] == 100
197 assert evdev.slots[1][libevdev.EV_ABS.ABS_MT_TRACKING_ID] == 1
198 assert evdev.slots[1][libevdev.EV_ABS.ABS_MT_POSITION_X] == 150
199 assert evdev.slots[1][libevdev.EV_ABS.ABS_MT_POSITION_Y] == 200
205 assert evdev.slots[0][libevdev.EV_ABS.ABS_MT_TRACKING_ID] == -1
206 assert evdev.slots[1][libevdev.EV_ABS.ABS_MT_TRACKING_ID] == 1
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
241 idx = int(k[-1]) - 1
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},