From b22eaa87512dcd15f50f8714faf7fbeab5efd744 Mon Sep 17 00:00:00 2001 From: Tobias Roeddiger Date: Tue, 24 Oct 2023 10:47:05 +0200 Subject: [PATCH] Update OpenEarable.js --- assets/js/OpenEarable.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/js/OpenEarable.js b/assets/js/OpenEarable.js index 92269dd..d9190bb 100644 --- a/assets/js/OpenEarable.js +++ b/assets/js/OpenEarable.js @@ -460,7 +460,7 @@ class SensorManager { const byteData = new DataView(data.buffer); let byteIndex = 0; const sensorId = byteData.getUint8(byteIndex); - byteIndex += 1; // TODO: switch to 2, we can skip size byte based on parse scheme + byteIndex += 2; const timestamp = byteData.getUint32(byteIndex, true); // true means little-endian byteIndex += 4; const parsedData = {}; @@ -705,4 +705,4 @@ class ButtonManager { this.buttonStateChangedSubscribers.forEach(callback => callback(new DataView(notification.srcElement.value.buffer).getUint8(0))); }); } -} \ No newline at end of file +}