Skip to content

Commit

Permalink
Merge pull request JMRI#12166 from Lionel642/master
Browse files Browse the repository at this point in the history
Fix issue when advanced consist address is the same as the head loc
  • Loading branch information
danielb987 authored Jul 8, 2023
2 parents 4623216 + 46730ea commit 124bd3b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion java/src/jmri/jmrit/throttle/AddressPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,11 @@ public void notifyConsistThrottleFound(DccThrottle t) {
if (consist != null && consist.getConsistType() == Consist.ADVANCED_CONSIST) {
// request a throttle for head locomotive for functions
DccLocoAddress headLocoAddress = consist.getConsistList().get(0);
changeOfAddress(headLocoAddress);
// only if consist address is not head locomotive address
if (! headLocoAddress.equals(currentAddress)) {
log.debug("Advanced consist throttle, requesting secondary throttle for head locomotive function control.");
changeOfAddress(headLocoAddress);
}
}
}

Expand Down

0 comments on commit 124bd3b

Please sign in to comment.