Introduce compass in navigation
This commit is contained in:
parent
a270874c1e
commit
899e187198
5 changed files with 9 additions and 7 deletions
|
@ -12,7 +12,8 @@
|
|||
<string name="osmand_parking_hours">Hours</string>
|
||||
<string name="osmand_parking_minutes">Minutes</string>
|
||||
<string name="osmand_parking_position_description_add_time">The car was parked at:</string>
|
||||
|
||||
<string name="use_compass_navigation_descr">Use compass in navigation when diretion is not detected</string>
|
||||
<string name="use_compass_navigation">Use compass</string>
|
||||
<string name="select_animate_speedup">Select animate route acceleration</string>
|
||||
<string name="monitoring_info_control">Info Control</string>
|
||||
<string name="monitoring_info_control_desc">Show monitoring state on the info pane</string>
|
||||
|
|
|
@ -25,10 +25,8 @@
|
|||
<ListPreference android:title="@string/voice_provider" android:key="voice_provider" android:summary="@string/voice_provider_descr"></ListPreference>
|
||||
<ListPreference android:key="auto_follow_route" android:title="@string/choose_auto_follow_route"
|
||||
android:summary="@string/choose_auto_follow_route_descr"></ListPreference>
|
||||
<!-- try without AUTO_FOLLOW_ROUTE_NAV (see forum discussion 'Simplify our navigation preference menu')
|
||||
<CheckBoxPreference android:summary="@string/auto_follow_route_navigation_descr" android:title="@string/auto_follow_route_navigation"
|
||||
android:key="auto_follow_route_navigation"></CheckBoxPreference>
|
||||
-->
|
||||
<CheckBoxPreference android:summary="@string/use_compass_navigation_descr" android:title="@string/use_compass_navigation"
|
||||
android:key="use_compass_navigation"></CheckBoxPreference>
|
||||
</PreferenceScreen>
|
||||
</PreferenceCategory>
|
||||
|
||||
|
|
|
@ -1159,6 +1159,9 @@ public class OsmandSettings {
|
|||
// this value string is synchronized with settings_pref.xml preference name
|
||||
public final OsmandPreference<String> VOICE_PROVIDER = new StringPreference("voice_provider", null).makeProfile();
|
||||
|
||||
// this value string is synchronized with settings_pref.xml preference name
|
||||
public final OsmandPreference<Boolean> USE_COMPASS_IN_NAVIGATION = new BooleanPreference("use_compass_navigation", true).makeProfile().cache();
|
||||
|
||||
// this value string is synchronized with settings_pref.xml preference name
|
||||
public final CommonPreference<String> RENDERER = new StringPreference("renderer", RendererRegistry.DEFAULT_RENDER) {
|
||||
{
|
||||
|
|
|
@ -728,7 +728,7 @@ public class MapActivity extends AccessibleActivity implements IMapLocationListe
|
|||
updateSpeedBearingEmulator(location);
|
||||
}
|
||||
|
||||
boolean enableSensorNavigation = routingHelper.isFollowingMode() ?
|
||||
boolean enableSensorNavigation = routingHelper.isFollowingMode() && settings.USE_COMPASS_IN_NAVIGATION.get() ?
|
||||
location == null || !location.hasBearing() : false;
|
||||
registerUnregisterSensor(location, enableSensorNavigation);
|
||||
|
||||
|
|
|
@ -262,7 +262,7 @@ public class SettingsActivity extends PreferenceActivity implements OnPreference
|
|||
registerBooleanPreference(osmandSettings.USE_ENGLISH_NAMES,screen);
|
||||
registerBooleanPreference(osmandSettings.AUTO_ZOOM_MAP,screen);
|
||||
registerBooleanPreference(osmandSettings.FAST_ROUTE_MODE,screen);
|
||||
// registerBooleanPreference(osmandSettings.USE_OSMAND_ROUTING_SERVICE_ALWAYS,screen);
|
||||
registerBooleanPreference(osmandSettings.USE_COMPASS_IN_NAVIGATION,screen);
|
||||
registerBooleanPreference(osmandSettings.LEFT_SIDE_NAVIGATION,screen);
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue