This commit is contained in:
Otto Winter 2018-11-07 21:59:55 +01:00
parent 6cf760fc3c
commit e459fe4cb5
No known key found for this signature in database
GPG Key ID: DB66C0BE6013F97E
2 changed files with 4 additions and 4 deletions

View File

@ -126,7 +126,7 @@ def run_esphomeflasher(argv):
print("Serial port closed!")
return
text = raw.decode(errors='ignore')
ANSI_REGEX.sub('', text)
text = ANSI_REGEX.sub('', text)
line = text.replace('\r', '').replace('\n', '')
time = datetime.now().time().strftime('[%H:%M:%S]')
message = time + line

View File

@ -2,13 +2,13 @@ import re
__version__ = "1.0.0"
ESP32_DEFAULT_OTA_DATA = 'https://github.com/espressif/arduino-esp32/blob/1.0.0/tools/partitions/boot_app0.bin'
ESP32_DEFAULT_OTA_DATA = 'https://raw.githubusercontent.com/espressif/arduino-esp32/1.0.0/tools/partitions/boot_app0.bin'
# The latest bootloader image seems to work with older firmwares, but the "stable" bootloader
# doesn't work with firmwares generated with the latest esp-idf
ESP32_DEFAULT_BOOTLOADER_FORMAT = 'https://github.com/espressif/arduino-esp32/raw/' \
ESP32_DEFAULT_BOOTLOADER_FORMAT = 'https://raw.githubusercontent.com/espressif/arduino-esp32/' \
'96822d783f3ab6a56a69b227ba4d1a1a36c66268/tools/sdk/' \
'bin/bootloader_$FLASH_MODE$_$FLASH_FREQ$.bin'
ESP32_DEFAULT_PARTITIONS = 'https://github.com/OttoWinter/esphomeflasher/blob/master/partitions.bin'
ESP32_DEFAULT_PARTITIONS = 'https://raw.githubusercontent.com/OttoWinter/esphomeflasher/master/partitions.bin'
# https://stackoverflow.com/a/3809435/8924614
HTTP_REGEX = re.compile(r'https?://(www\.)?[-a-zA-Z0-9@:%._+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)')