Skip to content

Commit bfac5a4

Browse files
authored
Merge pull request #239 from meshtastic/update-protos-for-shutdown
Shutdown command (should mirror reboot)
2 parents b15e5f5 + a3b09f0 commit bfac5a4

17 files changed

+357
-4147
lines changed

.pylintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
# Add files or directories matching the regex patterns to the blacklist. The
99
# regex matches against base names, not paths.
10-
ignore-patterns=mqtt_pb2.py,channel_pb2.py,environmental_measurement_pb2.py,admin_pb2.py,radioconfig_pb2.py,deviceonly_pb2.py,apponly_pb2.py,remote_hardware_pb2.py,portnums_pb2.py,mesh_pb2.py,storeforward_pb2.py
10+
ignore-patterns=mqtt_pb2.py,channel_pb2.py,environmental_measurement_pb2.py,admin_pb2.py,radioconfig_pb2.py,deviceonly_pb2.py,apponly_pb2.py,remote_hardware_pb2.py,portnums_pb2.py,mesh_pb2.py,storeforward_pb2.py,cannedmessages_pb2.py
1111

1212

1313

meshtastic/__main__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,10 @@ def onConnected(interface):
252252
closeNow = True
253253
interface.getNode(args.dest).reboot()
254254

255+
if args.shutdown:
256+
closeNow = True
257+
interface.getNode(args.dest).shutdown()
258+
255259
if args.sendtext:
256260
closeNow = True
257261
channelIndex = 0
@@ -803,6 +807,9 @@ def initParser():
803807
parser.add_argument(
804808
"--reboot", help="Tell the destination node to reboot", action="store_true")
805809

810+
parser.add_argument(
811+
"--shutdown", help="Tell the destination node to shutdown", action="store_true")
812+
806813
parser.add_argument(
807814
"--reply", help="Reply to received messages",
808815
action="store_true")

meshtastic/admin_pb2.py

Lines changed: 9 additions & 179 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

meshtastic/apponly_pb2.py

Lines changed: 8 additions & 46 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)