mirror of
https://github.com/esphome/esphome-flasher.git
synced 2024-11-21 11:45:23 +01:00
BugFix: Upload speed fallback logic (#44)
- Fix the problem that the error from detect_flash_size() doesn't get caught (because detect_flash_size() also tries to catch esptool.FatalError, and it will raise the error again as EsphomeflasherError) - Fix typo
This commit is contained in:
parent
12ed27be9b
commit
8fc5341336
@ -123,9 +123,9 @@ def run_esphomeflasher(argv):
|
||||
# Check if the higher baud rate works
|
||||
try:
|
||||
flash_size = detect_flash_size(stub_chip)
|
||||
except esptool.FatalError as err:
|
||||
except EsphomeflasherError as err:
|
||||
# Go back to old baud rate by recreating chip instance
|
||||
print("Chip does not support baud rate {}, changing to 115200".format(args.upload_baud_Rate))
|
||||
print("Chip does not support baud rate {}, changing to 115200".format(args.upload_baud_rate))
|
||||
stub_chip._port.close()
|
||||
chip = detect_chip(port, args.esp8266, args.esp32)
|
||||
stub_chip = chip_run_stub(chip)
|
||||
|
Loading…
Reference in New Issue
Block a user