Skip to content

Commit 59f2c58

Browse files
authored
Merge 4da2d77 into 82fefa5
2 parents 82fefa5 + 4da2d77 commit 59f2c58

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

source/brailleDisplayDrivers/brailliantB.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
HR_KEYS = b"\x04"
3636
HR_BRAILLE = b"\x05"
3737
HR_POWEROFF = b"\x07"
38+
HID_USAGE_PAGE = 0x93
3839

3940
KEY_NAMES = {
4041
1: "power", # Brailliant BI 32, 40 and 80.
@@ -147,6 +148,9 @@ def __init__(self, port="auto"):
147148
# Try talking to the display.
148149
try:
149150
if self.isHid:
151+
if (usasePage := portInfo.get("HIDUsagePage")) != HID_USAGE_PAGE:
152+
log.debugWarning(f"Ignoring device {port!r} with usage page {usasePage!r}")
153+
continue
150154
self._dev = hwIo.Hid(port, onReceive=self._hidOnReceive)
151155
else:
152156
self._dev = hwIo.Serial(

0 commit comments

Comments
 (0)