Skip to content
Permalink
Browse files

correctly handle feedback in DIRECT mode.

  • Loading branch information...
pabender committed Oct 5, 2018
1 parent 6a91ad6 commit e2994550f3e693d29fab849a1e28fa03de2cac93
Showing with 6 additions and 2 deletions.
  1. +6 −2 java/src/jmri/jmrix/dccpp/DCCppTurnout.java
@@ -154,7 +154,11 @@ public void setCommandedState(int s) {
synchronized (this) {
newKnownState(INCONSISTENT);
}
}
} else if( _activeFeedbackType == DIRECT ){
synchronized (this) {
newKnownState(s);
}
}
}

// Handle a request to change state by sending a DCC++ command
@@ -194,7 +198,7 @@ synchronized protected void forwardCommandChangeToLayout(int s) {
// Convert the integer Turnout value to boolean for DCC++ internal code.
// Assume if it's not THROWN (true), it must be CLOSED (false).
msg = DCCppMessage.makeAccessoryDecoderMsg(mNumber, newstate);
internalState = IDLE; // change this!
internalState = IDLE;
break;

}

0 comments on commit e299455

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