Update the heading, even if the sensor is unreliable.
This makes it possible to use a different indicator for the unreliable case, instead of just changing the RenderMode to NORMAL.
This commit is contained in:
committed by
Łukasz Paczos
parent
7bcc2d3282
commit
e3b2452ba2
@@ -106,7 +106,9 @@ class LocationComponentCompassEngine implements CompassEngine, SensorEventListen
|
||||
public void onSensorChanged(@NonNull SensorEvent event) {
|
||||
if (lastAccuracySensorStatus == SensorManager.SENSOR_STATUS_UNRELIABLE) {
|
||||
Logger.d(TAG, "Compass sensor is unreliable, device calibration is needed.");
|
||||
return;
|
||||
// Update the heading, even if the sensor is unreliable.
|
||||
// This makes it possible to use a different indicator for the unreliable case, instead of just changing the RenderMode to NORMAL.
|
||||
//return;
|
||||
}
|
||||
if (event.sensor.getType() == Sensor.TYPE_ROTATION_VECTOR) {
|
||||
rotationVectorValue = getRotationVectorFromSensorEvent(event);
|
||||
|
||||
Reference in New Issue
Block a user