tests_kernel.test_sony module
- class CalibratedPS4Controller
Bases:
object- accelerometer_calibration_data = {'x': {'bias': -73, 'denom': 16472, 'numer': 16384}, 'y': {'bias': -352, 'denom': 16344, 'numer': 16384}, 'z': {'bias': 81, 'denom': 16319, 'numer': 16384}}
- gyroscope_calibration_data = {'x': {'bias': 0, 'denom': 17827, 'numer': 1105920}, 'y': {'bias': 0, 'denom': 17777, 'numer': 1105920}, 'z': {'bias': 0, 'denom': 17748, 'numer': 1105920}}
- class CalibratedPS4ControllerBluetooth(rdesc=[5, 1, 9, 5, 161, 1, 133, 1, 9, 48, 9, 49, 9, 50, 9, 53, 21, 0, 38, 255, 0, 117, 8, 149, 4, 129, 2, 9, 57, 21, 0, 37, 7, 117, 4, 149, 1, 129, 66, 5, 9, 25, 1, 41, 14, 21, 0, 37, 1, 117, 1, 149, 14, 129, 2, 117, 6, 149, 1, 129, 1, 5, 1, 9, 51, 9, 52, 21, 0, 38, 255, 0, 117, 8, 149, 2, 129, 2, 6, 4, 255, 133, 2, 9, 36, 149, 36, 177, 2, 133, 163, 9, 37, 149, 48, 177, 2, 133, 5, 9, 38, 149, 40, 177, 2, 133, 6, 9, 39, 149, 52, 177, 2, 133, 7, 9, 40, 149, 48, 177, 2, 133, 8, 9, 41, 149, 47, 177, 2, 133, 9, 9, 42, 149, 19, 177, 2, 6, 3, 255, 133, 3, 9, 33, 149, 38, 177, 2, 133, 4, 9, 34, 149, 46, 177, 2, 133, 240, 9, 71, 149, 63, 177, 2, 133, 241, 9, 72, 149, 63, 177, 2, 133, 242, 9, 73, 149, 15, 177, 2, 6, 0, 255, 133, 17, 9, 32, 21, 0, 38, 255, 0, 117, 8, 149, 77, 129, 2, 9, 33, 145, 2, 133, 18, 9, 34, 149, 141, 129, 2, 9, 35, 145, 2, 133, 19, 9, 36, 149, 205, 129, 2, 9, 37, 145, 2, 133, 20, 9, 38, 150, 13, 1, 129, 2, 9, 39, 145, 2, 133, 21, 9, 40, 150, 77, 1, 129, 2, 9, 41, 145, 2, 133, 22, 9, 42, 150, 141, 1, 129, 2, 9, 43, 145, 2, 133, 23, 9, 44, 150, 205, 1, 129, 2, 9, 45, 145, 2, 133, 24, 9, 46, 150, 13, 2, 129, 2, 9, 47, 145, 2, 133, 25, 9, 48, 150, 34, 2, 129, 2, 9, 49, 145, 2, 6, 128, 255, 133, 130, 9, 34, 149, 63, 177, 2, 133, 131, 9, 35, 177, 2, 133, 132, 9, 36, 177, 2, 133, 144, 9, 48, 177, 2, 133, 145, 9, 49, 177, 2, 133, 146, 9, 50, 177, 2, 133, 147, 9, 51, 177, 2, 133, 160, 9, 64, 177, 2, 133, 164, 9, 68, 177, 2, 192], name='Wireless Controller')
Bases:
CalibratedPS4Controller,PS4ControllerBluetooth
- class CalibratedPS4ControllerUSB(rdesc=[5, 1, 9, 5, 161, 1, 133, 1, 9, 48, 9, 49, 9, 50, 9, 53, 21, 0, 38, 255, 0, 117, 8, 149, 4, 129, 2, 9, 57, 21, 0, 37, 7, 53, 0, 70, 59, 1, 101, 20, 117, 4, 149, 1, 129, 66, 101, 0, 5, 9, 25, 1, 41, 14, 21, 0, 37, 1, 117, 1, 149, 14, 129, 2, 6, 0, 255, 9, 32, 117, 6, 149, 1, 21, 0, 37, 127, 129, 2, 5, 1, 9, 51, 9, 52, 21, 0, 38, 255, 0, 117, 8, 149, 2, 129, 2, 6, 0, 255, 9, 33, 149, 54, 129, 2, 133, 5, 9, 34, 149, 31, 145, 2, 133, 4, 9, 35, 149, 36, 177, 2, 133, 2, 9, 36, 149, 36, 177, 2, 133, 8, 9, 37, 149, 3, 177, 2, 133, 16, 9, 38, 149, 4, 177, 2, 133, 17, 9, 39, 149, 2, 177, 2, 133, 18, 6, 2, 255, 9, 33, 149, 15, 177, 2, 133, 19, 9, 34, 149, 22, 177, 2, 133, 20, 6, 5, 255, 9, 32, 149, 16, 177, 2, 133, 21, 9, 33, 149, 44, 177, 2, 6, 128, 255, 133, 128, 9, 32, 149, 6, 177, 2, 133, 129, 9, 33, 149, 6, 177, 2, 133, 130, 9, 34, 149, 5, 177, 2, 133, 131, 9, 35, 149, 1, 177, 2, 133, 132, 9, 36, 149, 4, 177, 2, 133, 133, 9, 37, 149, 6, 177, 2, 133, 134, 9, 38, 149, 6, 177, 2, 133, 135, 9, 39, 149, 35, 177, 2, 133, 136, 9, 40, 149, 63, 177, 2, 133, 137, 9, 41, 149, 2, 177, 2, 133, 144, 9, 48, 149, 5, 177, 2, 133, 145, 9, 49, 149, 3, 177, 2, 133, 146, 9, 50, 149, 3, 177, 2, 133, 147, 9, 51, 149, 12, 177, 2, 133, 148, 9, 52, 149, 63, 177, 2, 133, 160, 9, 64, 149, 6, 177, 2, 133, 161, 9, 65, 149, 1, 177, 2, 133, 162, 9, 66, 149, 1, 177, 2, 133, 163, 9, 67, 149, 48, 177, 2, 133, 164, 9, 68, 149, 13, 177, 2, 133, 240, 9, 71, 149, 63, 177, 2, 133, 241, 9, 72, 149, 63, 177, 2, 133, 242, 9, 73, 149, 15, 177, 2, 133, 167, 9, 74, 149, 1, 177, 2, 133, 168, 9, 75, 149, 1, 177, 2, 133, 169, 9, 76, 149, 8, 177, 2, 133, 170, 9, 78, 149, 1, 177, 2, 133, 171, 9, 79, 149, 57, 177, 2, 133, 172, 9, 80, 149, 57, 177, 2, 133, 173, 9, 81, 149, 11, 177, 2, 133, 174, 9, 82, 149, 1, 177, 2, 133, 175, 9, 83, 149, 2, 177, 2, 133, 176, 9, 84, 149, 63, 177, 2, 133, 224, 9, 87, 149, 2, 177, 2, 133, 179, 9, 85, 149, 63, 177, 2, 133, 180, 9, 85, 149, 63, 177, 2, 133, 181, 9, 86, 149, 63, 177, 2, 133, 208, 9, 88, 149, 63, 177, 2, 133, 212, 9, 89, 149, 63, 177, 2, 192])
Bases:
CalibratedPS4Controller,PS4ControllerUSB
- class CalibratedPS5Controller
Bases:
object- accelerometer_calibration_data = {'x': {'bias': 0, 'denom': 16374, 'numer': 16384}, 'y': {'bias': -114, 'denom': 16362, 'numer': 16384}, 'z': {'bias': 2, 'denom': 16395, 'numer': 16384}}
- gyroscope_calibration_data = {'x': {'bias': 0, 'denom': 17727, 'numer': 1105920}, 'y': {'bias': 0, 'denom': 17728, 'numer': 1105920}, 'z': {'bias': 0, 'denom': 17769, 'numer': 1105920}}
- class CalibratedPS5ControllerBluetooth(rdesc=[5, 1, 9, 5, 161, 1, 133, 1, 9, 48, 9, 49, 9, 50, 9, 53, 21, 0, 38, 255, 0, 117, 8, 149, 4, 129, 2, 9, 57, 21, 0, 37, 7, 53, 0, 70, 59, 1, 101, 20, 117, 4, 149, 1, 129, 66, 101, 0, 5, 9, 25, 1, 41, 14, 21, 0, 37, 1, 117, 1, 149, 14, 129, 2, 117, 6, 149, 1, 129, 1, 5, 1, 9, 51, 9, 52, 21, 0, 38, 255, 0, 117, 8, 149, 2, 129, 2, 6, 0, 255, 21, 0, 38, 255, 0, 117, 8, 149, 77, 133, 49, 9, 49, 145, 2, 9, 59, 129, 2, 133, 50, 9, 50, 149, 141, 145, 2, 133, 51, 9, 51, 149, 205, 145, 2, 133, 52, 9, 52, 150, 13, 1, 145, 2, 133, 53, 9, 53, 150, 77, 1, 145, 2, 133, 54, 9, 54, 150, 141, 1, 145, 2, 133, 55, 9, 55, 150, 205, 1, 145, 2, 133, 56, 9, 56, 150, 13, 2, 145, 2, 133, 57, 9, 57, 150, 34, 2, 145, 2, 6, 128, 255, 133, 5, 9, 51, 149, 40, 177, 2, 133, 8, 9, 52, 149, 47, 177, 2, 133, 9, 9, 36, 149, 19, 177, 2, 133, 32, 9, 38, 149, 63, 177, 2, 133, 34, 9, 64, 149, 63, 177, 2, 133, 128, 9, 40, 149, 63, 177, 2, 133, 129, 9, 41, 149, 63, 177, 2, 133, 130, 9, 42, 149, 9, 177, 2, 133, 131, 9, 43, 149, 63, 177, 2, 133, 241, 9, 49, 149, 63, 177, 2, 133, 242, 9, 50, 149, 15, 177, 2, 133, 240, 9, 48, 149, 63, 177, 2, 192])
Bases:
CalibratedPS5Controller,PS5ControllerBluetooth
- class CalibratedPS5ControllerUSB(rdesc=[5, 1, 9, 5, 161, 1, 133, 1, 9, 48, 9, 49, 9, 50, 9, 53, 9, 51, 9, 52, 21, 0, 38, 255, 0, 117, 8, 149, 6, 129, 2, 6, 0, 255, 9, 32, 149, 1, 129, 2, 5, 1, 9, 57, 21, 0, 37, 7, 53, 0, 70, 59, 1, 101, 20, 117, 4, 149, 1, 129, 66, 101, 0, 5, 9, 25, 1, 41, 15, 21, 0, 37, 1, 117, 1, 149, 15, 129, 2, 6, 0, 255, 9, 33, 149, 13, 129, 2, 6, 0, 255, 9, 34, 21, 0, 38, 255, 0, 117, 8, 149, 52, 129, 2, 133, 2, 9, 35, 149, 47, 145, 2, 133, 5, 9, 35, 149, 40, 177, 2, 133, 8, 9, 36, 149, 47, 177, 2, 133, 9, 9, 36, 149, 19, 177, 2, 133, 10, 9, 37, 149, 26, 177, 2, 133, 32, 9, 38, 149, 63, 177, 2, 133, 33, 9, 39, 149, 4, 177, 2, 133, 34, 9, 64, 149, 63, 177, 2, 133, 128, 9, 40, 149, 63, 177, 2, 133, 129, 9, 41, 149, 63, 177, 2, 133, 130, 9, 42, 149, 9, 177, 2, 133, 131, 9, 43, 149, 63, 177, 2, 133, 132, 9, 44, 149, 63, 177, 2, 133, 133, 9, 45, 149, 2, 177, 2, 133, 160, 9, 46, 149, 1, 177, 2, 133, 224, 9, 47, 149, 63, 177, 2, 133, 240, 9, 48, 149, 63, 177, 2, 133, 241, 9, 49, 149, 63, 177, 2, 133, 242, 9, 50, 149, 15, 177, 2, 192])
Bases:
CalibratedPS5Controller,PS5ControllerUSB
- class SonyBaseTest
Bases:
object- class SonyPS4ControllerTest
Bases:
SonyTest- kernel_modules: list[KernelModule] = [KernelModule(driver_name='playstation', module_name='hid_playstation')]
- test_accelerometer()
- test_battery()
- test_gyroscope()
- test_mt_dual_touch()
Send 2 touches in the first 2 slots. Make sure the kernel sees this as a dual touch. Release and check
Note: PTP will send here BTN_DOUBLETAP emulation
- test_mt_single_touch()
send a single touch in the first slot of the device, and release it.
- class SonyTest
Bases:
TestGamepad
- class TestPS3Controller
Bases:
SonyTest- create_device()
- kernel_modules: list[KernelModule] = [KernelModule(driver_name='sony', module_name='hid_sony')]
- start_controller()
- class TestPS4ControllerBluetooth
Bases:
SonyPS4ControllerTest- create_device()
- class TestPS4ControllerUSB
Bases:
SonyPS4ControllerTest- create_device()
- class TestPS5ControllerBluetooth
Bases:
SonyPS4ControllerTest- create_device()
- kernel_modules: list[KernelModule] = [KernelModule(driver_name='playstation', module_name='hid_playstation')]
- class TestPS5ControllerUSB
Bases:
SonyPS4ControllerTest- create_device()
- kernel_modules: list[KernelModule] = [KernelModule(driver_name='playstation', module_name='hid_playstation')]