Skip to content
Permalink
Browse files

update Speed Step Mode in the LocoNet throttle if we are notified of …

…a change.
  • Loading branch information...
pabender committed Jul 14, 2019
1 parent 4176eec commit 804bcd61578e57e27824f78849bb995d54d7412d
Showing with 24 additions and 0 deletions.
  1. +24 −0 java/src/jmri/jmrix/loconet/LocoNetThrottle.java
@@ -561,6 +561,30 @@ public void notifyChangedSlot(LocoNetSlot pSlot) {
return;
}

switch (slot.decoderType()) {
case LnConstants.DEC_MODE_128:
case LnConstants.DEC_MODE_128A:
if(DccThrottle.SpeedStepMode128 != getSpeedStepMode()) {
setSpeedStepMode(DccThrottle.SpeedStepMode128);
}
break;
case LnConstants.DEC_MODE_28:
case LnConstants.DEC_MODE_28A:
case LnConstants.DEC_MODE_28TRI:
if(DccThrottle.SpeedStepMode28 != getSpeedStepMode()) {
setSpeedStepMode(DccThrottle.SpeedStepMode28);
}
break;
case LnConstants.DEC_MODE_14:
if(DccThrottle.SpeedStepMode14 != getSpeedStepMode()) {
setSpeedStepMode(DccThrottle.SpeedStepMode14);
}
break;
default:
log.warn("Unhandled decoder type: {}", slot.decoderType());
break;
}

// Functions
if (this.f0 != slot.isF0()) {
temp = this.f0;

0 comments on commit 804bcd6

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