Fix small issues
This commit is contained in:
parent
30cabc1518
commit
681f6a27e0
2 changed files with 7 additions and 2 deletions
|
@ -104,7 +104,7 @@ public class RoutePlannerFrontEnd {
|
|||
}
|
||||
}
|
||||
if(ctx.calculationMode == RouteCalculationMode.COMPLEX && routeDirection == null
|
||||
&& maxDistance > Math.max(ctx.config.DEVIATION_RADIUS * 4, 30000)) {
|
||||
&& maxDistance > ctx.config.DEVIATION_RADIUS * 6) {
|
||||
RoutingContext nctx = buildRoutingContext(ctx.config, ctx.nativeLib, ctx.getMaps(), RouteCalculationMode.BASE);
|
||||
nctx.calculationProgress = ctx.calculationProgress ;
|
||||
List<RouteSegmentResult> ls = searchRoute(nctx, start, end, intermediates);
|
||||
|
|
|
@ -11,6 +11,7 @@ import java.util.List;
|
|||
|
||||
import net.osmand.IndexConstants;
|
||||
import net.osmand.PlatformUtil;
|
||||
import net.osmand.plus.ApplicationMode;
|
||||
import net.osmand.plus.ClientContext;
|
||||
import net.osmand.plus.OsmandSettings;
|
||||
import net.osmand.plus.OsmandSettings.MetricsConstants;
|
||||
|
@ -118,7 +119,11 @@ public abstract class AbstractPrologCommandPlayer implements CommandPlayer {
|
|||
config = new FileInputStream(new File(voiceDir, configFile)); //$NON-NLS-1$
|
||||
// }
|
||||
MetricsConstants mc = settings.METRIC_SYSTEM.get();
|
||||
prologSystem.addTheory(new Theory("appMode('"+settings.getApplicationMode().toString().toLowerCase()+"')."));
|
||||
ApplicationMode m = settings.getApplicationMode();
|
||||
if(m.getParent() != null) {
|
||||
m = m.getParent();
|
||||
}
|
||||
prologSystem.addTheory(new Theory("appMode('"+m.getStringKey().toLowerCase()+"')."));
|
||||
prologSystem.addTheory(new Theory("measure('"+mc.toTTSString()+"')."));
|
||||
prologSystem.addTheory(new Theory(config));
|
||||
} catch (InvalidTheoryException e) {
|
||||
|
|
Loading…
Reference in a new issue