Add:Core:Added more support in debugging navigation/announcement problems
authormartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Sat, 15 Nov 2008 17:56:58 +0000 (17:56 +0000)
committermartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Sat, 15 Nov 2008 17:56:58 +0000 (17:56 +0000)
git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk/navit@1728 ffa7fe5e-494d-0410-b361-a75ebd5db220

navit/item_def.h
navit/navit.c
navit/navit.xml

index f99a8ca..b03feb9 100644 (file)
@@ -277,6 +277,8 @@ ITEM(nav_none)
 ITEM(nav_position)
 ITEM(nav_destination)
 ITEM(tec_common)
+ITEM(trackpoint_tracked)
+ITEM(announcement)
 /* Line */
 ITEM2(0x80000000,line)
 ITEM2(0x80000001,line_unspecified)
@@ -380,6 +382,7 @@ ITEM(tracking_70)
 ITEM(tracking_80)
 ITEM(tracking_90)
 ITEM(tracking_100)
+ITEM(track_tracked)
 /* Area */
 ITEM2(0xc0000000,area)
 ITEM2(0xc0000001,area_unspecified)
index 22080d6..3924969 100644 (file)
@@ -927,7 +927,7 @@ navit_speak(struct navit *this_)
                while ((item=map_rect_get_item(mr)) && item->type == type_nav_position);
                if (item && item_attr_get(item, attr_navigation_speech, &attr)) {
                        speech_say(this_->speech, attr.u.str);
-                       navit_textfile_debug_log(this_, "item=point_debug debug=\"speech_say('%s')\"", attr.u.str);
+                       navit_textfile_debug_log(this_, "type=announcement label=\"%s\"", attr.u.str);
                }
                map_rect_destroy(mr);
        }
@@ -1530,8 +1530,10 @@ navit_add_log(struct navit *this_, struct log *log)
        if (!log_get_attr(log, attr_type, &type_attr, NULL))
                return 0;
        if (!strcmp(type_attr.u.str, "textfile_debug")) {
+               char *header = "type=track_tracked\n";
                if (this_->textfile_debug_log)
                        return 0;
+               log_set_header(log, header, strlen(header));
                this_->textfile_debug_log=log;
                return 1;
        }
@@ -1695,6 +1697,7 @@ navit_vehicle_update(struct navit *this_, struct navit_vehicle *nv)
                        navit_set_position(this_, &cursor_pc);
                }
        }
+       navit_textfile_debug_log(this_, "type=trackpoint_tracked");
        transform(this_->trans, pro, &nv->coord, &cursor_pnt, 1, 0);
        if (!transform_within_border(this_->trans, &cursor_pnt, border)) {
                if (!this_->cursor_flag) {
index cdb7cda..3c95931 100644 (file)
@@ -1101,6 +1101,9 @@ http://wiki.navit-project.org/index.php/Configuring_NavIt
                                <itemgra item_types="track" order="7-">
                                        <polyline color="#3f3f3f" width="1" />
                                </itemgra>
+                               <itemgra item_types="track_tracked" order="7-">
+                                       <polyline color="#3f3fff" width="3" />
+                               </itemgra>
                                <itemgra item_types="poi_airport" order="5-">
                                        <icon src="airport.xpm" />
                                </itemgra>
@@ -1600,6 +1603,10 @@ http://wiki.navit-project.org/index.php/Configuring_NavIt
                                <itemgra item_types="nav_none" order="0-">
                                        <icon src="unknown.xpm" />
                                </itemgra>
+                               <itemgra item_types="announcement" order="7-">
+                                       <icon src="gui_sound_32_32.png" />
+                                       <circle color="#FF089C" radius="10"  text_size="7" />
+                               </itemgra>
 
 
                                <!-- I'm not sure if the following stuff should appear in any layout. Maybe portions should only apply to the bicyle layout. -->