Skip to content
Permalink
Browse files

Merge pull request #5634 from mstevetodd/master

update jmri shutdown cmd, LnSim slotmax=5
  • Loading branch information...
bobjacobsen committed Aug 11, 2018
2 parents bea1458 + 282e885 commit e279343ae210d8af1fdfcefbc4e603348e4f591a
@@ -208,9 +208,9 @@ public void requestThrottleSetup(LocoAddress a, boolean control) {
connectedAddresses++;
DccLocoAddress address = (DccLocoAddress) a;
//create some testing situations
if (connectedAddresses > 3) {
log.warn("SLOT MAX of 3 exceeded");
failedThrottleRequest(address, "SLOT MAX of 3 exceeded");
if (connectedAddresses > 5) {
log.warn("SLOT MAX of 5 exceeded");
failedThrottleRequest(address, "SLOT MAX of 5 exceeded");
return;
}
// otherwise, continue with setup
@@ -78,9 +78,9 @@ public void requestThrottleSetup(LocoAddress a, boolean control) {
connectedAddresses++;
DccLocoAddress address = (DccLocoAddress) a;
//create some testing situations
if (connectedAddresses > 3) {
log.warn("SLOT MAX of 3 exceeded");
failedThrottleRequest(address, "SLOT MAX of 3 exceeded");
if (connectedAddresses > 5) {
log.warn("SLOT MAX of 5 exceeded");
failedThrottleRequest(address, "SLOT MAX of 5 exceeded");
return;
}
// otherwise, continue with setup
@@ -0,0 +1,14 @@
# Restart a Raspberry Pi or other Linux machine cleanly
#
# Run this from a Logix or button to safely restart the machine
#
# From a sequence by Dave Sand

import java
import jmri

# start the machine restarting in 1 minute (requires that you can "sudo" without a password)
java.lang.Runtime.getRuntime().exec("sudo shutdown -r +1")

# do an immediate graceful shutdown of JMRI
shutdown.shutdown()
@@ -1,16 +1,14 @@
# Shut down an Raspberry Pi or other Linux machine cleanly
# Shutdown a Raspberry Pi or other Linux machine cleanly
#
# Run this from e.g. a Logix to end JMRI and make it save to turn off the machine
# Run this from a Logix or button to safely restart the machine
#
# From a sequence by Dave Sand


import java
import jmri
import jmri.InstanceManager

# start the machine going down in one minute (requires that you can "sudo" without a password)
# start the machine going down in 1 minute (requires that you can "sudo" without a password)
java.lang.Runtime.getRuntime().exec("sudo shutdown -h +1")

# do an immediate graceful shutdown of JMRI
jmri.InstanceManager.shutDownManagerInstance().shutdown()
shutdown.shutdown()

0 comments on commit e279343

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