summaryrefslogtreecommitdiff
path: root/navit/route.c
diff options
context:
space:
mode:
authormvglasow <michael -at- vonglasow.com>2018-06-09 17:43:06 +0200
committermvglasow <michael -at- vonglasow.com>2018-06-09 18:12:18 +0200
commitad318d7fec18389e9cf1810b7470c4cf1377f836 (patch)
treefa40bfc82ffc6b60fae69dab7b25dbba4e50c8ed /navit/route.c
parent577035ad134f8eba168095abc79dbb07851f40a3 (diff)
downloadnavit-ad318d7fec18389e9cf1810b7470c4cf1377f836.tar.gz
Fix:core:Enable turnaround penalty in LPA* (conditional via #ifdef)
Signed-off-by: mvglasow <michael -at- vonglasow.com>
Diffstat (limited to 'navit/route.c')
-rw-r--r--navit/route.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/navit/route.c b/navit/route.c
index a705321d4..3a7d8e3bf 100644
--- a/navit/route.c
+++ b/navit/route.c
@@ -68,6 +68,8 @@
#include "roadprofile.h"
#include "debug.h"
+#define X_TURNAROUND_PENALTY
+
struct map_priv {
struct route *route;
};
@@ -2057,8 +2059,7 @@ static void route_graph_point_update(struct vehicleprofile *profile, struct rout
for (s = p->start; s; s = s->start_next) { /* Iterate over all the segments leading away from our point */
val = route_value_seg(profile, p, s, 1);
-#if 0
- /* FIXME this seems to break routing (no path found on re-route), examine */
+#ifdef X_TURNAROUND_PENALTY
if (val != INT_MAX && s->end->seg && item_is_equal(s->data.item, s->end->seg->data.item)) {
if (profile->turn_around_penalty2)
val += profile->turn_around_penalty2;
@@ -2077,8 +2078,7 @@ static void route_graph_point_update(struct vehicleprofile *profile, struct rout
for (s = p->end; s; s = s->end_next) { /* Iterate over all the segments leading towards our point */
val = route_value_seg(profile, p, s, -1);
-#if 0
- /* FIXME this seems to break routing (no path found on re-route), examine */
+#ifdef X_TURNAROUND_PENALTY
if (val != INT_MAX && s->start->seg && item_is_equal(s->data.item, s->start->seg->data.item)) {
if (profile->turn_around_penalty2)
val += profile->turn_around_penalty2;