Skip to content

Commit

Permalink
Fix device detection at startup (from last commit)
Browse files Browse the repository at this point in the history
  • Loading branch information
berarma committed Aug 27, 2020
1 parent 7d598f5 commit 18ac50d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions oversteer/device_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,8 @@ def init_device_list(self):
context = pyudev.Context()
for udevice in context.list_devices(subsystem='input', ID_INPUT_JOYSTICK=1):
usb_id = str(udevice.get('ID_VENDOR_ID')) + ':' + str(udevice.get('ID_MODEL_ID'))
if usb_id not in self.supported_wheels:
return
self.update_device_list(udevice)
if usb_id in self.supported_wheels:
self.update_device_list(udevice)

logging.debug('Devices:' + str(self.devices))

Expand Down

0 comments on commit 18ac50d

Please sign in to comment.