- bool v=!(reply.get_data()[0]&0x04);
- unsigned b=(high?2:1);
- route=(route&~b)|(v?b:0);
- signal_route_changed.emit(route);
+ if(on && !pending_cmds)
+ {
+ path = pending_path;
+ on = false;
+ control.set_timer(500*Time::msec).signal_timeout.connect(
+ sigc::bind_return(sigc::bind(sigc::mem_fun(this, &Turnout::command), 3), false));
+ signal_path_changed.emit(path);
+ }
+ }
+ else if(reply.get_error()==ERR_NO_I2C_SPACE)
+ {
+ control.set_timer(100*Time::msec).signal_timeout.connect(
+ sigc::bind_return(sigc::bind(sigc::mem_fun(this, &Turnout::command), bit), false));