Tools: uploader.py: set write_timeout

This is needed to prevent Windows from hanging when trying to write to
"Standard Serial over Bluetooth" ports.
This commit is contained in:
Bob Long 2024-01-09 16:49:46 +11:00 committed by Tom Pittenger
parent 511659e6ee
commit eb10b81964
1 changed files with 1 additions and 1 deletions

View File

@ -275,7 +275,7 @@ class uploader(object):
self.force_erase = force_erase self.force_erase = force_erase
# open the port, keep the default timeout short so we can poll quickly # open the port, keep the default timeout short so we can poll quickly
self.port = serial.Serial(portname, baudrate_bootloader, timeout=2.0) self.port = serial.Serial(portname, baudrate_bootloader, timeout=2.0, write_timeout=2.0)
self.baudrate_bootloader = baudrate_bootloader self.baudrate_bootloader = baudrate_bootloader
if baudrate_bootloader_flash is not None: if baudrate_bootloader_flash is not None:
self.baudrate_bootloader_flash = baudrate_bootloader_flash self.baudrate_bootloader_flash = baudrate_bootloader_flash