Skip to content
This repository has been archived by the owner on Jul 3, 2023. It is now read-only.

Bump esptool from 2.8 to 3.2 #71

Merged
merged 2 commits into from
Oct 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion esphomeflasher/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ def __init__(self, flash_size, addr_filename, flash_mode, flash_freq):
self.verify = False
self.erase_all = False
self.encrypt = False
self.encrypt_files = None


class ChipInfo(object):
Expand Down Expand Up @@ -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()
Expand Down
10 changes: 7 additions & 3 deletions esphomeflasher/gui.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -28,7 +29,7 @@


# 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
Expand Down Expand Up @@ -140,8 +141,11 @@ def write(self, string):
self._line = ''
continue

def flush(self):
pass
def writable(self):
return True

def isatty(self) -> bool:
return True


class FlashingThread(threading.Thread):
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
wxpython>=4.1.1,<5.0
esptool==2.8
esptool==3.2
requests>=2.24.0,<3