Skip to content

Commit

Permalink
remove deprecated consistManagerInstance
Browse files Browse the repository at this point in the history
  • Loading branch information
bobjacobsen committed Feb 3, 2018
1 parent 2ac4fb5 commit b0fe0c3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion jython/AutoDispatcher2.py
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,7 @@ def userSettings(self):

# Get consists from JMRI
# Any consist must be defined before starting AutoDispatcher
consistMan = InstanceManager.consistManagerInstance()
consistMan = InstanceManager.getDefault(jmri.ConsistManager)
consists = consistMan.getConsistList()
# Any consist?
if len(consists) == 0 :
Expand Down
4 changes: 2 additions & 2 deletions jython/ConsistExample.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def init(self):
self.throttle3.setSpeedSetting(0)

# create the consist
self.myConsist=jmri.InstanceManager.consistManagerInstance().getConsist(jmri.DccLocoAddress(24,False))
self.myConsist=jmri.InstanceManager.getDefault(jmri.ConsistManager).getConsist(jmri.DccLocoAddress(24,False))

# Add locomotive 1234 to the consist with it's forward as the
# consist forward direction, and 5678 to the consist with its # normal forward direction as the reverse direction.
Expand Down Expand Up @@ -70,7 +70,7 @@ def handle(self):
self.myConsist.remove(jmri.DccLocoAddress(5678,True))

# and for good measure, delete the consist
self.myConsist=jmri.InstanceManager.consistManagerInstance().delConsist(jmri.DccLocoAddress(24,False))
self.myConsist=jmri.InstanceManager.getDefault(jmri.ConsistManager).delConsist(jmri.DccLocoAddress(24,False))

return 0 # to stop

Expand Down

0 comments on commit b0fe0c3

Please sign in to comment.