From d05aaf416b052f349e50d2ad66eb1a1fd5436b44 Mon Sep 17 00:00:00 2001 From: Gerrit Niezen Date: Wed, 29 May 2019 10:13:34 +0100 Subject: [PATCH] fix linting issues --- lib/drivers/medtronic600/medtronic600Driver.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/drivers/medtronic600/medtronic600Driver.js b/lib/drivers/medtronic600/medtronic600Driver.js index 2d9ea617b6..a4d075be09 100644 --- a/lib/drivers/medtronic600/medtronic600Driver.js +++ b/lib/drivers/medtronic600/medtronic600Driver.js @@ -1701,19 +1701,20 @@ class ReadHistoryCommand extends TransmitPacketRequest { for (let i = 0; i < blockPayload.length / ReadHistoryCommand.BLOCK_SIZE; i++) { const blockSize = blockPayload .readUInt16BE(((i + 1) * ReadHistoryCommand.BLOCK_SIZE) - 4); - const blockChecksum = blockPayload - .readUInt16BE(((i + 1) * ReadHistoryCommand.BLOCK_SIZE) - 2); + // const blockChecksum = blockPayload + // .readUInt16BE(((i + 1) * ReadHistoryCommand.BLOCK_SIZE) - 2); const blockStart = i * ReadHistoryCommand.BLOCK_SIZE; const blockData = blockPayload.slice(blockStart, blockStart + blockSize); - const calculatedChecksum = NGPMessage.ccittChecksum(blockData, blockSize); + // const calculatedChecksum = NGPMessage.ccittChecksum(blockData, blockSize); // if (blockChecksum !== calculatedChecksum) { - // throw new ChecksumError(blockChecksum, calculatedChecksum, `Unexpected checksum in block ${i}`); + // throw new ChecksumError(blockChecksum, calculatedChecksum, + // `Unexpected checksum in block ${i}`); // } else { console.log('NOTE: Not validating checksums in this test version!'); - this.blocks.push(blockData); - //} + this.blocks.push(blockData); + // } } this.bytesFetched += blockPayload.length;