diff options
author | geoghegan <geoghegan@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2010-09-28 19:12:48 +0000 |
---|---|---|
committer | geoghegan <geoghegan@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2010-09-28 19:12:48 +0000 |
commit | a0656680f71605a0b3dfd3610510fef8a4a9cb19 (patch) | |
tree | dbab8d64c386f7a1db58eadc1047a7b87ad9d4ca /navit/roadprofile.c | |
parent | e69ee4a1662426ee88686b78f9494f350f651672 (diff) | |
download | navit-svn-a0656680f71605a0b3dfd3610510fef8a4a9cb19.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.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/navit/roadprofile.c b/navit/roadprofile.c index 07c29299..8fa617c1 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_; |