Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More robust firmware upload #1560

Merged

Conversation

pkendall64
Copy link
Collaborator

As I was explaining to user on discord how the wifi updates work I realised there was a case where a bad flash could occur!

This PR fixes that case by passing the size of the firmware file in a HTTP header that the device will use to pass to the updater. This means that once the upload is complete we can check with the updater class that it has received all the expected data and if not then the update can be cancelled and an error returned to the user.
Previously we set the updater expected size to as much free space as we had (or unlimited on ESP32) and at the end just blindly told the updater to go ahead!

@wvarty
Copy link
Collaborator

wvarty commented May 7, 2022

Set TX into wifi update via AP, and then moved it to the edge of the wifi range, right before it dropped the wifi connection to the PC.
Upload was very slow as expected, but I could not get this to fail.
Wifi upload worked as expected, so from a regression test POV, this looks good.

@pkendall64 pkendall64 merged commit d9af2e8 into ExpressLRS:2.x.x-maintenance May 7, 2022
@pkendall64 pkendall64 deleted the more-robust-wifi-update branch May 8, 2022 23:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants