From 0c8ce1270aac8112cabab7db334fc238efbb2237 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Sun, 17 Mar 2019 17:06:30 +0100 Subject: [PATCH] Make parameter 0-based maxnumber of changes --- .../src/main/java/net/osmand/router/TransportRoutePlanner.java | 2 +- .../java/net/osmand/router/TransportRoutingConfiguration.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/OsmAnd-java/src/main/java/net/osmand/router/TransportRoutePlanner.java b/OsmAnd-java/src/main/java/net/osmand/router/TransportRoutePlanner.java index 0c447be793..2b26566cf0 100644 --- a/OsmAnd-java/src/main/java/net/osmand/router/TransportRoutePlanner.java +++ b/OsmAnd-java/src/main/java/net/osmand/router/TransportRoutePlanner.java @@ -67,7 +67,7 @@ public class TransportRoutePlanner { ctx.visitedRoutesCount++; ctx.visitedSegments.put(segment.getId(), segment); - if (segment.getDepth() > ctx.cfg.maxNumberOfChanges) { + if (segment.getDepth() > ctx.cfg.maxNumberOfChanges + 1) { continue; } if (segment.distFromStart > finishTime + ctx.cfg.finishTimeSeconds || diff --git a/OsmAnd-java/src/main/java/net/osmand/router/TransportRoutingConfiguration.java b/OsmAnd-java/src/main/java/net/osmand/router/TransportRoutingConfiguration.java index 4c71e5307f..a5c3f7bae9 100644 --- a/OsmAnd-java/src/main/java/net/osmand/router/TransportRoutingConfiguration.java +++ b/OsmAnd-java/src/main/java/net/osmand/router/TransportRoutingConfiguration.java @@ -18,7 +18,7 @@ public class TransportRoutingConfiguration { public int walkChangeRadius = 300; - public int maxNumberOfChanges = 4; + public int maxNumberOfChanges = 3; public int finishTimeSeconds = 1200;