From 01e83271e324c486b66dca906fa55a69a83d8d8c Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Mon, 5 Feb 2024 16:21:40 -0800 Subject: [PATCH] port our vid/pid parsing from the old electron way to what WebSerial does --- src/api/focus.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/api/focus.js b/src/api/focus.js index 357d9ea45..d4557cd16 100644 --- a/src/api/focus.js +++ b/src/api/focus.js @@ -59,8 +59,8 @@ class Focus { }); for (const port of portList) { - const pid = parseInt("0x" + port.productId), - vid = parseInt("0x" + port.vendorId); + const pid = port.productId; + const vid = port.vendorId; if (pid == usbInfo.productId && vid == usbInfo.vendorId) { const newPort = Object.assign({}, port); @@ -223,8 +223,8 @@ class Focus { for (const port of portList) { for (const device_descriptor of device_descriptors) { - const pid = parseInt("0x" + port.productId), - vid = parseInt("0x" + port.vendorId); + const pid = port.productId; + const vid = port.vendorId; if (pid == device_descriptor.usb.productId && vid == device_descriptor.usb.vendorId) { const newPort = Object.assign({}, port);