/[zanavi_public1]/navit/navit/navit.c
ZANavi

Diff of /navit/navit/navit.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 2 Revision 14
101static void navit_set_vehicle(struct navit *this_, struct navit_vehicle *nv); 101static void navit_set_vehicle(struct navit *this_, struct navit_vehicle *nv);
102 102
103int allow_gui_internal = 0; 103int allow_gui_internal = 0;
104int routing_mode = 0; 104int routing_mode = 0;
105int MYSTERY_SPEED = 2; 105int MYSTERY_SPEED = 2;
106int offline_search_filter_duplicates = 0;
107int offline_search_break_searching = 0;
106 108
107struct navit *global_navit; 109struct navit *global_navit;
108 110
109void 111void
110navit_add_mapset(struct navit *this_, struct mapset *ms) 112navit_add_mapset(struct navit *this_, struct mapset *ms)
2179 map_set_attr(map, &active); 2181 map_set_attr(map, &active);
2180 } 2182 }
2181 } 2183 }
2182 if (this_->tracking) { 2184 if (this_->tracking) {
2183 if ((map=tracking_get_map(this_->tracking))) { 2185 if ((map=tracking_get_map(this_->tracking))) {
2184 struct attr map_a,active; 2186 struct attr map_a,active,map_name;
2185 map_a.type=attr_map; 2187 map_a.type=attr_map;
2186 map_a.u.map=map; 2188 map_a.u.map=map;
2187 active.type=attr_active; 2189 active.type=attr_active;
2188 active.u.num=0; 2190 active.u.num=0;
2191 map_name.type=attr_name;
2192 map_name.u.str="_ms_tracking";
2193 map_set_attr(map_a.u.map, &map_name);
2189 mapset_add_attr(ms, &map_a); 2194 mapset_add_attr(ms, &map_a);
2190 map_set_attr(map, &active); 2195 map_set_attr(map, &active);
2191 } 2196 }
2192 } 2197 }
2193 navit_add_former_destinations_from_file(this_); 2198 // *DISABLED* navit_add_former_destinations_from_file(this_);
2194 } 2199 }
2195 if (this_->route) { 2200 if (this_->route) {
2196 struct attr callback; 2201 struct attr callback;
2197 this_->route_cb=callback_new_attr_1(callback_cast(navit_redraw_route), attr_route_status, this_); 2202 this_->route_cb=callback_new_attr_1(callback_cast(navit_redraw_route), attr_route_status, this_);
2198 callback.type=attr_callback; 2203 callback.type=attr_callback;
3178 case 1: 3183 case 1:
3179 route_remove_waypoint(this_->route); 3184 route_remove_waypoint(this_->route);
3180 count=route_get_destinations(this_->route, pc, 16); 3185 count=route_get_destinations(this_->route, pc, 16);
3181 destination_file = bookmarks_get_destination_file(TRUE); 3186 destination_file = bookmarks_get_destination_file(TRUE);
3182 bookmarks_append_coord(this_->bookmarks, destination_file, pc, count, "former_itinerary_part", NULL, NULL, this_->recentdest_count); 3187 bookmarks_append_coord(this_->bookmarks, destination_file, pc, count, "former_itinerary_part", NULL, NULL, this_->recentdest_count);
3188#ifdef HAVE_API_ANDROID
3189 // waypoint reached
3190 android_return_generic_int(5, 1);
3191#endif
3183 break; 3192 break;
3184 case 2: 3193 case 2:
3185 navit_set_destination(this_, NULL, NULL, 0); 3194 navit_set_destination(this_, NULL, NULL, 0);
3195 // ** inform java that we reached our destination **
3196#ifdef HAVE_API_ANDROID
3197 android_return_generic_int(4, 1);
3198#endif
3186 break; 3199 break;
3187 } 3200 }
3188 } 3201 }
3189 //profile(0,"return 5\n"); 3202 //profile(0,"return 5\n");
3190 // dbg(0,"navit_vehicle_update_999\n"); 3203 // dbg(0,"navit_vehicle_update_999\n");

Legend:
Removed from v.2  
changed lines
  Added in v.14

   
Visit the ZANavi Wiki