{
case MM: return 14;
case MM_27: return 27;
- case MFX: return 127;
+ case MFX: return 126;
default: return 0;
}
}
unsigned id = map_address(locos, loco_addr, addr);
if(id)
+ {
+ Locomotive &loco = locos[id];
+ if(loco.protocol==MFX && speed)
+ ++speed;
command(format("set(%d, speedstep[%d])", id, speed));
+ }
}
void CentralStation::set_loco_reverse(unsigned addr, bool rev)
cross = true;
}
- unsigned symbol;
+ unsigned symbol = Turnout::LEFT;
if(cross)
symbol = Turnout::DOUBLESLIP;
else if(left && right)
else if(i->first=="speedstep")
{
loco.speed = lexical_cast<unsigned>(i->second);
+ if(loco.protocol==MFX && loco.speed)
+ --loco.speed;
speed_changed = true;
}
else if(i->first=="dir")