File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -861,6 +861,10 @@ def setSimpleConfig(modem_preset):
861861 )
862862 interface .getNode (args .dest , False ).iface .waitForAckNak ()
863863
864+ if args .wait_to_disconnect :
865+ print (f"Waiting { args .wait_to_disconnect } seconds before disconnecting" )
866+ time .sleep (int (args .wait_to_disconnect ))
867+
864868 # if the user didn't ask for serial debugging output, we might want to exit after we've done our operation
865869 if (not args .seriallog ) and closeNow :
866870 interface .close () # after running command then exit
@@ -1473,6 +1477,14 @@ def initParser():
14731477 action = "store_true" ,
14741478 )
14751479
1480+ group .add_argument (
1481+ "--wait-to-disconnect" ,
1482+ help = "How many seconds to wait before disconnecting from the device." ,
1483+ const = "5" ,
1484+ nargs = "?" ,
1485+ action = "store" ,
1486+ )
1487+
14761488 group .add_argument (
14771489 "--noproto" ,
14781490 help = "Don't start the API, just function as a dumb serial terminal." ,
You can’t perform that action at this time.
0 commit comments