Skip to content

Commit

Permalink
Update OpenEarable.js
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiasRoeddiger authored Oct 24, 2023
1 parent 5efc941 commit b22eaa8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions assets/js/OpenEarable.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {};
Expand Down Expand Up @@ -705,4 +705,4 @@ class ButtonManager {
this.buttonStateChangedSubscribers.forEach(callback => callback(new DataView(notification.srcElement.value.buffer).getUint8(0)));
});
}
}
}

0 comments on commit b22eaa8

Please sign in to comment.