Skip to content

Commit

Permalink
Merge pull request #1660 from tidepool-org/filter-signature-pads
Browse files Browse the repository at this point in the history
Filter out signature pads (UPLOAD-1393)
  • Loading branch information
gniezen authored Oct 31, 2024
2 parents 5e64192 + 1f79b7b commit 096766d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
11 changes: 8 additions & 3 deletions app/main.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -273,11 +273,16 @@ operating system, as soon as possible.`,

mainWindow.webContents.session.on('select-serial-port', (event, portList, webContents, callback) => {
event.preventDefault();
portList = portList.filter(port => (
// filter out signature pads
port.serialNumber !== 'TOPAZBSB' &&
!(typeof port.deviceInstanceId === 'string' && port.deviceInstanceId.includes('TOPAZBSB'))
));
console.log('Port list:', portList);

let selectedPort;
for (let i = 0; i < serialPortFilter.length; i++) {
selectedPort = portList.find((element) =>
selectedPort = portList.find((element) =>
serialPortFilter[i].usbVendorId === parseInt(element.vendorId, 10) &&
serialPortFilter[i].usbProductId === parseInt(element.productId, 10)
);
Expand Down Expand Up @@ -717,7 +722,7 @@ if (!gotTheLock) {
return handleIncomingUrl(url);
}
});

// Protocol handler for osx
app.on('open-url', (event, url) => {
event.preventDefault();
Expand All @@ -733,4 +738,4 @@ function getURLFromArgs(args) {
}
}
return undefined;
}
}
2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "tidepool-uploader",
"productName": "tidepool-uploader",
"version": "2.59.1-ultra-plus-flex.3",
"version": "2.59.1-filter-signature-pads.2",
"description": "Tidepool Project Universal Uploader",
"main": "./main.prod.js",
"author": {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tidepool-uploader",
"version": "2.59.1-ultra-plus-flex.3",
"version": "2.59.1-filter-signature-pads.2",
"description": "Tidepool Project Universal Uploader",
"private": true,
"main": "main.prod.js",
Expand Down

0 comments on commit 096766d

Please sign in to comment.