From c815e0fadc62b443ff0492c34b088ae415d15be0 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 3 Jun 2016 01:29:18 +0300 Subject: [PATCH] Add explanation about waiting for the new serial port --- platformio/builder/tools/pioupload.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platformio/builder/tools/pioupload.py b/platformio/builder/tools/pioupload.py index 902a162b..caebdb56 100644 --- a/platformio/builder/tools/pioupload.py +++ b/platformio/builder/tools/pioupload.py @@ -48,9 +48,10 @@ def TouchSerialPort(env, port, baudrate): def WaitForNewSerialPort(env, before): + print "Waiting for the new upload port..." new_port = None elapsed = 0 - while elapsed < 10: + while elapsed < 5: now = [i['port'] for i in get_serialports(use_grep=True)] diff = list(set(now) - set(before)) if diff: @@ -63,7 +64,6 @@ def WaitForNewSerialPort(env, before): if not new_port and env.subst("$UPLOAD_PORT") in now: new_port = env.subst("$UPLOAD_PORT") - if not new_port: env.Exit("Error: Couldn't find a board on the selected port. " "Check that you have the correct port selected. "