This commit is contained in:
Victor Shcherb 2020-05-11 11:08:52 +02:00
parent abd8a616e4
commit c4cd8e8b7a

View file

@ -146,8 +146,8 @@ public class VoiceRouter {
public void updateAppMode() { public void updateAppMode() {
ApplicationMode appMode = router.getAppMode() == null ? settings.getApplicationMode() : router.getAppMode();
if (router.getAppMode().isDerivedRoutingFrom(ApplicationMode.CAR)) { if (appMode.isDerivedRoutingFrom(ApplicationMode.CAR)) {
// could be changed in future as others by default in settings is 45 kmh // could be changed in future as others by default in settings is 45 kmh
DEFAULT_SPEED = 14; // ~50 km/h DEFAULT_SPEED = 14; // ~50 km/h
//DEFAULT speed is configurable //DEFAULT speed is configurable
@ -157,7 +157,7 @@ public class VoiceRouter {
// DEFAULT_SPEED = 1.11f; //4 km/h 2f; // 7,2 km/h // DEFAULT_SPEED = 1.11f; //4 km/h 2f; // 7,2 km/h
} else { } else {
// minimal is 1 meter for turn now // minimal is 1 meter for turn now
DEFAULT_SPEED = (float) Math.max(0.3, router.getAppMode().getDefaultSpeed()); DEFAULT_SPEED = (float) Math.max(0.3, appMode.getDefaultSpeed());
} }