Skip to content

Commit

Permalink
Added log to off button
Browse files Browse the repository at this point in the history
  • Loading branch information
ThiasTux committed Nov 4, 2024
1 parent 4650f50 commit b058e8d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion assets/js/SensorManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ $(document).ready(function () {
}
});

$('.btn-disable-sensors').on('click', async function () {
$('#turnOffSensors').on('click', async function () {
// Set the sampling rate to 0 for all sensors
await openEarable.sensorManager.writeSensorConfig(0, 0, 0);
await openEarable.sensorManager.writeSensorConfig(1, 0, 0);
Expand All @@ -167,6 +167,10 @@ $(document).ready(function () {
$('#sensorSamplingRate, #microphoneSamplingRate, #pressureSensorSamplingRate').val('0');
$('#microphoneGainInner').val('40');
$('#microphoneGainOuter').val('40');

log("Setting sampling rate for IMU: 0 Hz");
log("Setting sampling rate for microphone: 0 Hz");
log("Setting sampling rate for pressure sensor: 0 Hz");
});

$('#isMicEnabled').on('change', function () {
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ <h5 class="card-title">Sensor Control</h5>
class="btn btn-control is-connect-enabled ms-3">Preload Run</button>
<button disabled id="testOcclusionButton"
class="btn btn-control is-connect-enabled ms-3 1-4-0-controls" style="min-width: 120px;">Test Occl.</button>
<button disabled
<button disabled id="turnOffSensors"
class="btn btn-disable-sensors btn-stop is-connect-enabled ms-3">Off</button>
</div>
</div>
Expand Down

0 comments on commit b058e8d

Please sign in to comment.