return this_->gra;
}
+struct vehicleprofile *
+navit_get_vehicleprofile(struct navit *this_)
+{
+ return this_->vehicleprofile;
+}
+
static void
navit_projection_set(struct navit *this_, enum projection pro)
{
#include "command.h"
#include "navit_nls.h"
#include "messages.h"
+#include "vehicleprofile.h"
+#include "roadprofile.h"
#include "osd.h"
struct compass {
struct map_rect *nav_mr = NULL;
struct item *item;
int offset,lines;
- int *speedlist = NULL;
int height=this->osd_item.font_size*13/256;
int yspacing=height/2;
int xspacing=height/4;
value = format_speed(routespeed, "");
}
- if ((routespeed == -1) && route && (speedlist=route_get_speedlist(route))) {
- if (item->type >= route_item_first && item->type <= route_item_last) {
- routespeed=speedlist[item->type-route_item_first];
+ if (routespeed == -1) {
+ struct vehicleprofile *prof=navit_get_vehicleprofile(navit);
+ struct roadprofile *rprof=NULL;
+ if (prof)
+ rprof=vehicleprofile_get_roadprofile(prof, item->type);
+ if (rprof) {
+ routespeed=rprof->speed;
value=format_speed(routespeed,"");
}
}
return 1;
}
-struct roadprofile_data *
+struct roadprofile *
vehicleprofile_get_roadprofile(struct vehicleprofile *this_, enum item_type type)
{
return g_hash_table_lookup(this_->roadprofile_hash, (void *)(long)type);