mirror of
https://github.com/scottbez1/smartknob.git
synced 2025-11-04 17:19:40 +08:00
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:
parent
ae28d523e0
commit
cfde66128c
@ -9,7 +9,7 @@ const main = async () => {
|
|||||||
// Implement a check for your device's vendor+product+serial
|
// 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")
|
// (this is more robust than the alternative of just hardcoding a "path" like "/dev/ttyUSB0")
|
||||||
return (
|
return (
|
||||||
portInfo.vendorId === '1a86' && portInfo.productId === '7523'
|
portInfo.vendorId?.toLowerCase() === '1a86'.toLowerCase() && portInfo.productId?.toLowerCase() === '7523'.toLowerCase()
|
||||||
// && portInfo.serialNumber === 'DEADBEEF'
|
// && portInfo.serialNumber === 'DEADBEEF'
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user