¿ªÔÆÌåÓý

Locked calling dispatcher from script #scripting #dispatcher


 

I am calling dispatcher from a jython script. The train starts and rtraverses the route, however I cannot get the train to slow down and stop.

I am using a speed profile and the train slows down and stops when called using the normal dispatcher.

I am calling the routine using

DF = jmri.InstanceManager.getDefault(jmri.jmrit.dispatcher.DispatcherFrame)

DF.loadTrainFromTrainInfo('T2_1.xml','ROSTER','diesel')

Where T2-1.xml is a normal xml file produced from dispatcher.

I presume that the stop command is called from an event when the train leaves the penultimate block, and I suspect I have not set a variable in the train info file which is normally set when calling the routine from dispatcher.

If i could be given a pointeras? to what extra variable(s)/routine(s) need to be called I would be grateful. I have downloaded the source and have tried to find the information, and experimented but failed dismally.

Thanks

Bill

Join [email protected] to automatically receive all group messages.