Merge commit 'refs/pull/857/head' of github.com:meshtastic/python into tmp/merge-918-857

This commit is contained in:
Ian McEwen
2026-05-31 12:52:02 -07:00
4 changed files with 17 additions and 20 deletions

View File

@@ -35,8 +35,6 @@ class SerialInterface(StreamInterface):
debugOut {stream} -- If a stream is provided, any debug serial output from the device will be emitted to that stream. (default: {None})
timeout -- How long to wait for replies (default: 300 seconds)
"""
self.noProto = noProto
self.devPath: Optional[str] = devPath
if self.devPath is None:
@@ -52,6 +50,11 @@ class SerialInterface(StreamInterface):
else:
self.devPath = ports[0]
StreamInterface.__init__(
self, debugOut=debugOut, noProto=noProto, connectNow=connectNow, noNodes=noNodes, timeout=timeout
)
def connect(self) -> None:
logger.debug(f"Connecting to {self.devPath}")
if sys.platform != "win32":
@@ -65,9 +68,7 @@ class SerialInterface(StreamInterface):
self.stream.flush() # type: ignore[attr-defined]
time.sleep(0.1)
StreamInterface.__init__(
self, debugOut=debugOut, noProto=noProto, connectNow=connectNow, noNodes=noNodes, timeout=timeout
)
super().connect()
def _set_hupcl_with_termios(self, f: TextIOWrapper):
"""first we need to set the HUPCL so the device will not reboot based on RTS and/or DTR