throw InvalidParameterValue("Invalid path");
layout.get_driver().set_turnout(turnout_id, p&1);
- if(type.get_n_paths()>2)
+ if(type.is_double_address())
layout.get_driver().set_turnout(turnout_id+1, p&2);
+ else if(type.get_n_paths()>2)
+ active_path = (active_path&1) | (p&2);
}
int Track::get_endpoint_by_link(const Track &other) const
throw Exception("Track endpoint did not have a counterpart");
}
+unsigned Track::traverse(unsigned i) const
+{
+ return traverse(i, active_path);
+}
+
TrackPoint Track::get_point(unsigned epi, unsigned path, float d) const
{
TrackPoint p = type.get_point(epi, path, d);