Version bump, add debug output

This commit is contained in:
Pieter Vander Vennet 2023-12-14 18:41:25 +01:00
parent fdde0aaeb3
commit 66369ef0b4
2 changed files with 8 additions and 2 deletions

View file

@ -1,6 +1,6 @@
{
"name": "mapcomplete",
"version": "0.36.4",
"version": "0.36.5",
"repository": "https://github.com/pietervdvn/MapComplete",
"description": "A small website to edit OSM easily",
"bugs": "https://github.com/pietervdvn/MapComplete/issues",

View file

@ -39,6 +39,7 @@
function handleOrientation(event) {
console.debug("Got gyro measurement")
gotMeasurement.setData(true)
// IF the phone is lying flat, then:
// alpha is the compass direction (but not absolute)
@ -56,7 +57,12 @@
}
}
window.addEventListener("deviceorientation", handleOrientation)
console.log("Starting device orientation listener")
try {
window.addEventListener("deviceorientation", e => handleOrientation(e))
} catch (e) {
console.log("Could not init device orientation api due to", e)
}
beta.map(beta => {
if (-safetyMargin < arrowDirection && arrowDirection < safetyMargin) {