Skip to content

Commit ea5c2f4

Browse files
authored
Merge pull request #221 from ExpressLRS/fix-wifi-upload
Fix wifi flashing via flasher.pyz
2 parents 2b4872c + cd288f6 commit ea5c2f4

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

python/binary_configurator.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,11 @@ def upload_wifi(args, mcuType, upload_addr):
5858
with open(args.file.name, 'rb') as f_in:
5959
with gzip.open('firmware.bin.gz', 'wb') as f_out:
6060
shutil.copyfileobj(f_in, f_out)
61-
upload_via_esp8266_backpack.do_upload('firmware.bin.gz', upload_addr, False, {})
61+
upload_via_esp8266_backpack.do_upload('firmware.bin.gz', upload_addr, {})
6262
else:
63-
upload_via_esp8266_backpack.do_upload(args.file.name, upload_addr, False, {})
64-
except:
63+
upload_via_esp8266_backpack.do_upload(args.file.name, upload_addr, {})
64+
except Exception as e:
65+
print("WIFI upload failed: %s" % e, file=sys.stderr)
6566
return ElrsUploadResult.ErrorGeneral
6667
return ElrsUploadResult.Success
6768

python/upload_via_esp8266_backpack.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def do_upload(elrs_bin_target, upload_addr, env):
1818
upload_addr = [upload_port]
1919

2020
for addr in upload_addr:
21-
addr = "http://%s/%s" % (addr, ['update', 'upload'])
21+
addr = "http://%s/update" % (addr,)
2222
print(" ** UPLOADING TO: %s" % addr)
2323
try:
2424
if bootloader_target is not None:

0 commit comments

Comments
 (0)