summaryrefslogtreecommitdiff
path: root/navit/roadprofile.c
diff options
context:
space:
mode:
authorgeoghegan <geoghegan@ffa7fe5e-494d-0410-b361-a75ebd5db220>2010-09-28 19:12:48 +0000
committergeoghegan <geoghegan@ffa7fe5e-494d-0410-b361-a75ebd5db220>2010-09-28 19:12:48 +0000
commitf55adfd4139e1f5ffe76c5eb8dd94eb07a1f679f (patch)
treedbab8d64c386f7a1db58eadc1047a7b87ad9d4ca /navit/roadprofile.c
parentceb77067532b3e98444c10a697a6327c10cd5cab (diff)
downloadnavit-f55adfd4139e1f5ffe76c5eb8dd94eb07a1f679f.tar.gz
Add:OSD:Adds a speed warner, as per ticket #609| Thanks dandor!
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@3583 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/roadprofile.c')
-rw-r--r--navit/roadprofile.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/navit/roadprofile.c b/navit/roadprofile.c
index 07c292995..8fa617c16 100644
--- a/navit/roadprofile.c
+++ b/navit/roadprofile.c
@@ -24,11 +24,14 @@
static void
roadprofile_set_attr_do(struct roadprofile *this, struct attr *attr)
-{
+{
switch (attr->type) {
case attr_speed:
this->speed=attr->u.num;
break;
+ case attr_maxspeed:
+ this->maxspeed=attr->u.num;
+ break;
case attr_route_weight:
this->route_weight=attr->u.num;
break;
@@ -44,6 +47,7 @@ roadprofile_new(struct attr *parent, struct attr **attrs)
struct attr **attr;
this_=g_new0(struct roadprofile, 1);
this_->attrs=attr_list_dup(attrs);
+ this_->maxspeed=0;
for (attr=attrs;*attr; attr++)
roadprofile_set_attr_do(this_, *attr);
return this_;