Fix firmware uploading to Arduino/Genuino 101 // Resolve #695

This commit is contained in:
Ivan Kravets committed 2016-06-15 16:02:04 +03:00
1 parent cdcf075635
commit 682e435ded
4 files changed
+16 -5

No files matched your search

+4 -2
View File
@@ -37,13 +37,15 @@ def FlushSerialBuffer(env, port):
def TouchSerialPort(env, port, baudrate):
port = env.subst(port)
print "Forcing reset using %dbps open/close on port %s" % (baudrate, port)
if system() != "Windows":
try:
s = Serial(env.subst(port))
s = Serial(port)
s.close()
except: # pylint: disable=W0702
pass
s = Serial(port=env.subst(port), baudrate=baudrate)
s = Serial(port=port, baudrate=baudrate)
s.setDTR(False)
s.close()
sleep(0.4)