diff options
Diffstat (limited to 'main/src/cgeo/geocaching/speech/SpeechService.java')
| -rw-r--r-- | main/src/cgeo/geocaching/speech/SpeechService.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/main/src/cgeo/geocaching/speech/SpeechService.java b/main/src/cgeo/geocaching/speech/SpeechService.java index 7226014..634f1c4 100644 --- a/main/src/cgeo/geocaching/speech/SpeechService.java +++ b/main/src/cgeo/geocaching/speech/SpeechService.java @@ -1,6 +1,7 @@ package cgeo.geocaching.speech; import cgeo.geocaching.DirectionProvider; +import cgeo.geocaching.settings.Settings; import cgeo.geocaching.geopoint.Geopoint; import cgeo.geocaching.utils.GeoDirHandler; import cgeo.geocaching.utils.Log; @@ -37,8 +38,8 @@ public class SpeechService extends Service implements OnInitListener { private boolean initialized = false; protected float direction; protected Geopoint position; - protected boolean directionInitialized; - protected boolean positionInitialized; + protected boolean directionInitialized = !Settings.isUseCompass(); // don't wait for magnetometer, if it shall not be used + protected boolean positionInitialized = false; GeoDirHandler geoHandler = new GeoDirHandler() { @Override @@ -109,10 +110,10 @@ public class SpeechService extends Service implements OnInitListener { private static float getDeltaForDistance(final float distance) { if (distance > 1.0) { return 0.2f; - } else if (distance > 0.05) { + } + if (distance > 0.05) { return distance / 5.0f; } - return 0f; } |
