Open aerostitch opened 10 years ago
Hi!
To add an option to navit.xml, at first you'll need an attribute. Look at attr_def.h and see if there exists already any suitable one, not used by route_guard osd. If there's no such an attribute, add new one to that file, keeping in mind that your attribute should be placed at the end of the section, right before ATTR2() style definition starting next section. For example, to create a simple int attribute, place it before ATTR2(0x00027500,type_rel_abs_begin) line.
Then, to easily work with attribute, you'll have to add a new member to the struct route_guard (that's what your variable num_warnings should be).
You should initialize num_warnings member in osd_route_guard_new function using attribute value supplied in navit.xml. Use attr_search for that like it's done for other attributes, don't forget to include some default value.
tryagain
p.s. Please don't forget to document your change after it's merged into svn ;)
Issue migrated from trac ticket # 1204
component: core | priority: minor
2014-04-18 11:39:37: openid@bokomoko.de created the issue