From cfde66128cf5a935e923160caddeab4f7dc78c7a Mon Sep 17 00:00:00 2001 From: CrosseyeJack Date: Thu, 27 Oct 2022 06:17:51 +0100 Subject: [PATCH] Quick lowercase hack to help Windows users (#103) Windows upper cases the vendor and product id, so the filter will fail. So LOWERCASE ALL THE THINGS! Co-authored-by: Crosseye Jack --- software/js/packages/example/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/software/js/packages/example/src/index.ts b/software/js/packages/example/src/index.ts index 965e409..0e23ab1 100644 --- a/software/js/packages/example/src/index.ts +++ b/software/js/packages/example/src/index.ts @@ -9,7 +9,7 @@ const main = async () => { // Implement a check for your device's vendor+product+serial // (this is more robust than the alternative of just hardcoding a "path" like "/dev/ttyUSB0") return ( - portInfo.vendorId === '1a86' && portInfo.productId === '7523' + portInfo.vendorId?.toLowerCase() === '1a86'.toLowerCase() && portInfo.productId?.toLowerCase() === '7523'.toLowerCase() // && portInfo.serialNumber === 'DEADBEEF' ) })