diff options
author | mvglasow <michael -at- vonglasow.com> | 2015-10-13 16:07:05 +0200 |
---|---|---|
committer | mvglasow <michael -at- vonglasow.com> | 2015-10-14 11:12:28 +0200 |
commit | a61ffd436b6a75157f2d6d6eb1112def8b958a1b (patch) | |
tree | a2d0cac105c5157247138b001db5220f7864062d /navit/navigation.c | |
parent | fb5ee0941668f3027f57412b3a910b4a48231f72 (diff) | |
download | navit-a61ffd436b6a75157f2d6d6eb1112def8b958a1b.tar.gz |
Add:core:When generating maneuvers, follow async choice made for routing
Signed-off-by: mvglasow <michael -at- vonglasow.com>
Diffstat (limited to 'navit/navigation.c')
-rw-r--r-- | navit/navigation.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/navit/navigation.c b/navit/navigation.c index 6c35a453e..baab11376 100644 --- a/navit/navigation.c +++ b/navit/navigation.c @@ -3843,6 +3843,9 @@ navigation_update_idle(struct navigation *this_) { struct navigation_itm *itm; time_t now; + /* Do not use the route_path_flag_cancel flag here because it is also used whenever + * destinations or waypoints change, not just when the user stops navigation altogether + */ if (!route_has_graph(this_->route)) { navigation_update_done(this_, 1); return; @@ -3905,7 +3908,6 @@ navigation_update(struct navigation *this_, struct route *route, struct attr *at { struct map *map; struct attr vehicleprofile; - int async = 1; /* FIXME determine if asynchronous routing was requested */ time_t now; @@ -3948,7 +3950,7 @@ navigation_update(struct navigation *this_, struct route *route, struct attr *at dbg(lvl_debug,"enter\n"); this_->status = status_busy; - if (async) { + if (route_get_flags(this_->route) & route_path_flag_async) { this_->idle_cb = callback_new_1(callback_cast(navigation_update_idle), this_); this_->idle_ev = event_add_idle(50, this_->idle_cb); } else { |