Skip to content

Commit

Permalink
Throttle button for Engine start-stop
Browse files Browse the repository at this point in the history
  • Loading branch information
klk32003 committed Feb 21, 2018
1 parent b9346ba commit d467dc5
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions java/src/jmri/jmrit/vsdecoder/EngineSoundEvent.java
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,17 @@ public void propertyChange(PropertyChangeEvent event) {
super.propertyChange(event);
if (event.getPropertyName().equals("SpeedSetting")) {
((EngineSound) parent.getSound("ENGINE")).handleSpeedChange((Float) event.getNewValue(), engine_pane);
} else if (event.getPropertyName().startsWith("F")) {
String ev = event.getPropertyName();
boolean val = (Boolean) event.getNewValue();
for (Trigger t : trigger_list.values()) {
log.debug("trigger name: {}, event: {}, target: {}", t.getName(), t.getEventName(), t.getTargetName());
if (ev.equals(t.getEventName())) {
if (t.getName().equals("ENGINE_STARTSTOP")) {
getEnginePane().startButtonClick();
}
}
}
}
//engine_pane.setThrottle(EngineSound.calcEngineNotch((Float)event.getNewValue()));
}
Expand Down

0 comments on commit d467dc5

Please sign in to comment.