File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -606,6 +606,17 @@ def handle_menu_key(self, c):
606606 sys .stderr .write ('--- Port changed to: {} ---\n ' .format (self .serial .port ))
607607 # and restart the reader thread
608608 self ._start_reader ()
609+ elif c in 'sS' : # S -> suspend / open port temporarily
610+ # reader thread needs to be shut down
611+ self ._stop_reader ()
612+ self .serial .close ()
613+ sys .stderr .write ('--- Port closed: {} ---\n ' .format (self .serial .port ))
614+ sys .stderr .write ('--- press any key to reconnect ---\n ' )
615+ self .console .getkey ()
616+ self .serial .open ()
617+ # and restart the reader thread
618+ self ._start_reader ()
619+ sys .stderr .write ('--- Port opened: {} ---\n ' .format (self .serial .port ))
609620 elif c in 'bB' : # B -> change baudrate
610621 sys .stderr .write ('\n --- Baudrate: ' )
611622 sys .stderr .flush ()
You can’t perform that action at this time.
0 commit comments