diff --git a/proxyclient/m1n1/proxy.py b/proxyclient/m1n1/proxy.py index 116e2376..c87c9aa1 100644 --- a/proxyclient/m1n1/proxy.py +++ b/proxyclient/m1n1/proxy.py @@ -139,7 +139,7 @@ class UartInterface(Reloadable): #d = self.dev.read(1) #while d != "": #d = self.dev.read(1) - self.dev.timeout = 3 + self.dev.timeout = int(os.environ.get("M1N1TIMEOUT", "3")) self.tty_enable = True self.handlers = {} self.evt_handlers = {} diff --git a/proxyclient/m1n1/proxyutils.py b/proxyclient/m1n1/proxyutils.py index a29e6e89..050c5977 100644 --- a/proxyclient/m1n1/proxyutils.py +++ b/proxyclient/m1n1/proxyutils.py @@ -441,6 +441,7 @@ class GuardedHeap: self.ptrs = set() def bootstrap_port(iface, proxy): + to = iface.dev.timeout try: iface.dev.timeout = 0.15 iface.nop() @@ -449,4 +450,4 @@ def bootstrap_port(iface, proxy): iface.dev.baudrate = 1500000 iface.nop() - iface.dev.timeout = 3 + iface.dev.timeout = to