forked from MapComplete/MapComplete
		
	Version bump, add debug output
This commit is contained in:
		
							parent
							
								
									fdde0aaeb3
								
							
						
					
					
						commit
						66369ef0b4
					
				
					 2 changed files with 8 additions and 2 deletions
				
			
		| 
						 | 
					@ -1,6 +1,6 @@
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  "name": "mapcomplete",
 | 
					  "name": "mapcomplete",
 | 
				
			||||||
  "version": "0.36.4",
 | 
					  "version": "0.36.5",
 | 
				
			||||||
  "repository": "https://github.com/pietervdvn/MapComplete",
 | 
					  "repository": "https://github.com/pietervdvn/MapComplete",
 | 
				
			||||||
  "description": "A small website to edit OSM easily",
 | 
					  "description": "A small website to edit OSM easily",
 | 
				
			||||||
  "bugs": "https://github.com/pietervdvn/MapComplete/issues",
 | 
					  "bugs": "https://github.com/pietervdvn/MapComplete/issues",
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -39,6 +39,7 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  function handleOrientation(event) {
 | 
					  function handleOrientation(event) {
 | 
				
			||||||
 | 
					    console.debug("Got gyro measurement")
 | 
				
			||||||
    gotMeasurement.setData(true)
 | 
					    gotMeasurement.setData(true)
 | 
				
			||||||
    // IF the phone is lying flat, then:
 | 
					    // IF the phone is lying flat, then:
 | 
				
			||||||
    // alpha is the compass direction (but not absolute)
 | 
					    // 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 => {
 | 
					  beta.map(beta => {
 | 
				
			||||||
    if (-safetyMargin < arrowDirection && arrowDirection < safetyMargin) {
 | 
					    if (-safetyMargin < arrowDirection && arrowDirection < safetyMargin) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue