Skip to content

Commit

Permalink
Merge pull request #1672 from tidepool-org/accu-chek-no-records
Browse files Browse the repository at this point in the history
Provide a message with information about uploading Accu-Chek meters with no data (UPLOAD-1410)
  • Loading branch information
gniezen authored Jan 23, 2025
2 parents 435bfdf + f28259c commit 343f135
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
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.60.0-deps-update.8",
"version": "2.60.0-accu-chek-no-records.1",
"description": "Tidepool Project Universal Uploader",
"main": "./main.prod.js",
"author": {
Expand Down
4 changes: 2 additions & 2 deletions lib/drivers/roche/accuChekUSB.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,14 +243,14 @@ class AccuChekUSB {
const incoming = await this.usbDevice.transferIn(this.usbDevice.usbconfig.inEPnum, 1024);
debug('Received data transfer request response:', common.bytes2hex(new Uint8Array(incoming.data.buffer), true));

if (incoming.data.length === 22 && incoming.data.getUint16(20)) {
if (incoming.data.byteLength === 22 && incoming.data.getUint16(20)) {
const dataResponse = incoming.data.getUint16(20);
if (dataResponse === 3) {
debug('Segment was empty');
} else {
throw new Error(`Could not retrieve data: ${DATA_RESPONSE[dataResponse]}`);
}
} else if (incoming.data.length < 22
} else if (incoming.data.byteLength < 22
|| incoming.data.getUint16(14) !== ACTION_TYPE.MDC_ACT_SEG_TRIG_XFER) {
throw new Error('Unexpected response');
} else {
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.60.0-deps-update.8",
"version": "2.60.0-accu-chek-no-records.1",
"description": "Tidepool Project Universal Uploader",
"private": true,
"main": "main.prod.js",
Expand Down

0 comments on commit 343f135

Please sign in to comment.