Skip to content

Commit

Permalink
fixed byte index
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiasRoeddiger committed Sep 23, 2024
1 parent 2ba1454 commit 803b71a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion assets/js/ChartManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ openEarable.sensorManager.subscribeOnSensorDataReceived((sensorData) => {
if (sensorData.sensorId === SENSOR_ID.MICROPHONE) {
if (recordMic) {
// Drop the first 8 bytes and append the rest
for (let i = 5; i < sensorData.rawByteData.byteLength; i++) {
for (let i = 6; i < sensorData.rawByteData.byteLength; i++) {
rawData.push(sensorData.rawByteData.getUint8(i));
}
printDataViewAsUint16List(sensorData.rawByteData);
Expand Down
1 change: 0 additions & 1 deletion assets/js/SensorManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ $(document).ready(function () {

// Ensure gain values are in the range of int8 (-128 to 127)
gainInner = (gainInner & 0xFF);
gainOuter = -1; // Outer mic is disabled, so gain is -1

// Combine gainInner and gainOuter into a uint32
// Set byte to enable microphone streaming
Expand Down

0 comments on commit 803b71a

Please sign in to comment.