turnout_id(0),
sensor_id(0),
links(type.get_endpoints().size()),
- active_path(0)
+ active_path(0),
+ path_changing(false)
{
if(type.is_turnout())
turnout_id = layout.allocate_turnout_id();
if(!(type.get_paths()&(1<<p)))
throw invalid_argument("Track::set_active_path");
+ path_changing = true;
layout.get_driver().set_turnout(turnout_id, p);
}
if(addr==turnout_id)
{
active_path = state;
+ path_changing = false;
signal_path_changed.emit(active_path);
}
}