mirror of
https://github.com/esphome/esphome-flasher.git
synced 2025-01-19 21:11:18 +01:00
Bump esptool from 2.8 to 3.2 (#71)
This commit is contained in:
parent
c49ec75f06
commit
7b21f8ef45
@ -23,6 +23,7 @@ class MockEsptoolArgs(object):
|
||||
self.verify = False
|
||||
self.erase_all = False
|
||||
self.encrypt = False
|
||||
self.encrypt_files = None
|
||||
|
||||
|
||||
class ChipInfo(object):
|
||||
@ -193,7 +194,11 @@ def detect_chip(port, force_esp8266=False, force_esp32=False):
|
||||
try:
|
||||
chip = esptool.ESPLoader.detect_chip(port)
|
||||
except esptool.FatalError as err:
|
||||
raise EsphomeflasherError("ESP Chip Auto-Detection failed: {}".format(err))
|
||||
if "Wrong boot mode detected" in str(err):
|
||||
msg = "ESP is not in flash boot mode. If your board has a flashing pin, try again while keeping it pressed."
|
||||
else:
|
||||
msg = "ESP Chip Auto-Detection failed: {}".format(err)
|
||||
raise EsphomeflasherError(msg) from err
|
||||
|
||||
try:
|
||||
chip.connect()
|
||||
|
@ -1,4 +1,5 @@
|
||||
# This GUI is a fork of the brilliant https://github.com/marcelstoer/nodemcu-pyflasher
|
||||
from io import TextIOBase
|
||||
import re
|
||||
import sys
|
||||
import threading
|
||||
@ -28,7 +29,7 @@ BACK_COLORS = {**COLORS, None: wx.BLACK}
|
||||
|
||||
|
||||
# See discussion at http://stackoverflow.com/q/41101897/131929
|
||||
class RedirectText:
|
||||
class RedirectText(TextIOBase):
|
||||
def __init__(self, text_ctrl):
|
||||
self._out = text_ctrl
|
||||
self._i = 0
|
||||
@ -140,8 +141,11 @@ class RedirectText:
|
||||
self._line = ''
|
||||
continue
|
||||
|
||||
def flush(self):
|
||||
pass
|
||||
def writable(self):
|
||||
return True
|
||||
|
||||
def isatty(self) -> bool:
|
||||
return True
|
||||
|
||||
|
||||
class FlashingThread(threading.Thread):
|
||||
|
@ -1,3 +1,3 @@
|
||||
wxpython>=4.1.1,<5.0
|
||||
esptool==2.8
|
||||
esptool==3.2
|
||||
requests>=2.24.0,<3
|
||||
|
Loading…
Reference in New Issue
Block a user