Skip to content
Permalink
Browse files

use Roco throttle manager for LokMaus II also.

  • Loading branch information...
pabender committed Oct 24, 2018
1 parent e41af18 commit 9fe7119ce2bec4e915f3be5180a5a938b2bb3fce
@@ -98,7 +98,27 @@ protected void init() {
jmri.InstanceManager.setLightManager(systemMemo.getLightManager());
systemMemo.setSensorManager(new jmri.jmrix.lenz.XNetSensorManager(systemMemo.getXNetTrafficController(), systemMemo.getSystemPrefix()));
jmri.InstanceManager.setSensorManager(systemMemo.getSensorManager());
} else if (CSType == 0x10) {
} else if (CSType == 0x04) {
if (log.isDebugEnabled()) {
log.debug("Command Station is LokMaus II");
}
systemMemo.setTurnoutManager(new jmri.jmrix.lenz.XNetTurnoutManager(systemMemo.getXNetTrafficController(), systemMemo.getSystemPrefix()));
jmri.InstanceManager.setTurnoutManager(systemMemo.getTurnoutManager());
systemMemo.setLightManager(new jmri.jmrix.lenz.XNetLightManager(systemMemo.getXNetTrafficController(), systemMemo.getSystemPrefix()));
jmri.InstanceManager.setLightManager(systemMemo.getLightManager());
systemMemo.setSensorManager(new jmri.jmrix.lenz.XNetSensorManager(systemMemo.getXNetTrafficController(), systemMemo.getSystemPrefix()));
jmri.InstanceManager.setSensorManager(systemMemo.getSensorManager());
systemMemo.setProgrammerManager(new XNetProgrammerManager(new XNetProgrammer(systemMemo.getXNetTrafficController()), systemMemo));
if (systemMemo.getProgrammerManager().isAddressedModePossible()) {
jmri.InstanceManager.store(systemMemo.getProgrammerManager(), jmri.AddressedProgrammerManager.class);
}
if (systemMemo.getProgrammerManager().isGlobalProgrammerAvailable()) {
jmri.InstanceManager.store(systemMemo.getProgrammerManager(), GlobalProgrammerManager.class);
}
systemMemo.setCommandStation(systemMemo.getXNetTrafficController().getCommandStation());
jmri.InstanceManager.store(systemMemo.getCommandStation(), jmri.CommandStation.class);
// LokMaus does not support XpressNET consist commands. Let's the default consist manager be loaded.
} else if (CSType == 0x10 ) {
if (log.isDebugEnabled()) {
log.debug("Command Station is multiMaus");
}
@@ -87,7 +87,8 @@ public void setProgrammerManager(XNetProgrammerManager p) {
*/
public ThrottleManager getThrottleManager() {
if (throttleManager == null) {
if (xt.getCommandStation().getCommandStationType() == 0x10) {
if (xt.getCommandStation().getCommandStationType() == 0x10 ||
xt.getCommandStation().getCommandStationType() == 0x04 ) {
throttleManager = new jmri.jmrix.roco.RocoXNetThrottleManager(this);
} else {
throttleManager = new XNetThrottleManager(this);

0 comments on commit 9fe7119

Please sign in to comment.
You can’t perform that action at this time.