Skip to content

Commit

Permalink
add webkitCompassHeading
Browse files Browse the repository at this point in the history
  • Loading branch information
danielgilbers committed Aug 27, 2024
1 parent 2164309 commit 733e89f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ <h4 style="margin-top:0.75rem;">Orientation</h4>
<li>X-axis (β): <span id="Orientation_b">0</span><span>°</span></li>
<li>Y-axis (γ): <span id="Orientation_g">0</span><span>°</span></li>
<li>Z-axis (α): <span id="Orientation_a">0</span><span>°</span></li>
<li>Compass: <span id="Orientation_compass">0</span><span>°</span></li>
</ul>

<h4>Accelerometer</h4>
Expand Down
1 change: 1 addition & 0 deletions js/sensor.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ function handleOrientation(event) {
updateFieldIfNotNull('Orientation_a', event.alpha);
updateFieldIfNotNull('Orientation_b', event.beta);
updateFieldIfNotNull('Orientation_g', event.gamma);
updateFieldIfNotNull('Orientation_g', event.webkitCompassHeading);
incrementEventCount();
}

Expand Down

0 comments on commit 733e89f

Please sign in to comment.