Kristian Sloth Lauszus
2018-05-06 21:38:40 +02:00
committed by László Monda
parent ec98e4e1c6
commit 04aa5236c2
2 changed files with 8 additions and 2 deletions
+4 -1
View File
@@ -238,7 +238,10 @@ export class UhkHidDevice {
const dev = devs.find((x: Device) =>
x.vendorId === Constants.VENDOR_ID &&
x.productId === Constants.PRODUCT_ID &&
((x.usagePage === 128 && x.usage === 129) || x.interface === 0));
// hidapi can not read the interface number on Mac, so check the usage page and usage
((x.usagePage === 128 && x.usage === 129) || // Old firmware
(x.usagePage === (0xFF00 | 0x00) && x.usage === 0x01) || // New firmware
x.interface === 0));
if (!dev) {
this.logService.debug('[UhkHidDevice] UHK Device not found:');