JMRI
JMRI copied to clipboard
Quiting JMRI with an AutoActiveTrain running fails to stop train before exiting.
When you quit JMRI with a manual throttle in operation, the throttle is set to Stop before JMRI exits so as to prevent runaways.
For trains running as AutoActiveTrain under Dispatcher, the automatic control is not terminated and the throttle is not set to Stop before JMRI exits, potentially leading to runaways.
@Pugwash1 Is this something for you to look at?
@danielb987 I don't think so. Dispatcher just uses the standard JMRI throttle. If JMRI crashes out do the WiFi throttles all set the speed to zero? Do web throttles set speed to zero? Warrant Throttles?
I don't know how these things works. Maybe it's only the throttle GUI that stops the train when JMRI shuts down.
Note that if I understands @DeanCording correctly, the issue is when JMRI exits cleanly, not when it crashes.
Note that if I understands @DeanCording correctly, the issue is when JMRI exits cleanly, not when it crashes.
That's correct. The reason I noticed is that when using the MQTT connected throttle it wasn't being set to speed 0 when I exited JMRI with an AutoTrain running. I know I spent quite a bit of effort to make sure MQTT throttles closed down safely with manual throttles, so this was a bit of a surprise.
I know I spent quite a bit of effort to make sure MQTT throttles closed down safely with manual throttles, so this was a bit of a surprise.
How does MQTT throttles closes down safely? If I use a manual throttle to run the train, is it the throttle GUI or the MQTT throttle that stops the train when JMRI quits?
On Thursday, 4 April 2024 12:15:54 PM AEST Daniel wrote:
I know I spent quite a bit of effort to make sure MQTT throttles closed down safely with manual throttles, so this was a bit of a surprise. How does MQTT throttles closes down safely? If I use a manual throttle to run the train, is it the throttle GUI or the MQTT throttle that stops the train when JMRI quits?
It relies on the controlling throttle to properly dispose of the MQTT throttle (which wasn't happening correctly by manual throttle at the time). The manual throttle disposes of the MQTT throttle, and on disposal MQTT throttle cancels all of the current throttle commands.
Here is the original issue involving manual throttles #12287
To do this correctly it has to be in throttlemanager so its behavior is consistant across all platforms.
This issue is stale because it has been open for 45 days with no activity.
This issue was closed because it has been inactive for 30 days since being marked as stale.
This was addressed in #13082.