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 <dan@crosseyejack.com>
This commit is contained in:
CrosseyeJack 2022-10-27 06:17:51 +01:00 committed by GitHub
parent ae28d523e0
commit cfde66128c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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'
)
})