Update with linux support over usb

This commit is contained in:
Florian Kaiser
2021-06-28 23:00:22 +02:00
parent f5529f1463
commit 28605e0023

View File

@@ -1,7 +1,9 @@
# needed for python > 3.8
import os, sys
if sys.platform.startswith('win32') and sys.version_info >= (3,8):
from sys import platform
if platform.startswith('Windows') and sys.version_info >= (3,8):
os.add_dll_directory(os.getcwd())
import hidapi
@@ -28,7 +30,12 @@ class pydualsense:
self.state = DSState() # controller states
self.conType = self.determineConnectionType() # determine USB or BT connection
if platform.startswith('Windows'):
self.conType = self.determineConnectionType() # determine USB or BT connection
else:
# set for usb manually
self.input_report_length = 64
self.output_report_length = 64
# thread for receiving and sending