Skip to content

Commit

Permalink
Amend last commit: Fix path filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
walmis committed Jan 22, 2024
1 parent d3d05ce commit 3829aa1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ffb_rhino.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,9 +420,10 @@ def __init__(self, vid = 0xFFFF, pid=0x2055, serial=None, path=None) -> None:
devs = FFBRhino.enumerate(pid)
if serial:
devs = list(filter(lambda x: x.serial_number == serial, devs))
if path:
devs = list(filter(lambda x: x.path == path, devs))
if not len(devs):
raise hid.HIDException('unable to open device')
path = devs[0].path
self.info = devs[0]

self._in_reports = {}
Expand Down

0 comments on commit 3829aa1

Please sign in to comment.