-
Notifications
You must be signed in to change notification settings - Fork 2
Firmware update tool [CPP-724] #531
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
Conversation
Refactor update code so that it can be reused in a separate utility.
Looks good to me this was a much needed refactor! Tested it out on usb connection and the update worked well. |
These messages are just progress messages, so we don't need to show a complete history of them.
Good idea, I've done this now - probably the best of both worlds! Only downside is I guess it's a little brittle on the format of those log messages. But probably unlikely that they'll change on Piksi (and worst case, if they do, it'll just spew out all the messages for a slightly worse UX): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks great, a few comments and suggestions
Co-authored-by: Jason Mobarak <[email protected]>
Ended up removing the progress bar as it was probably a bit weird that there was a progress bar for the upload but not for each of the writes that the Piksi spits out percentage done messages. The end result looks like this now, which is still a little janky but at least gives the user an idea of progress: firmware_update.mp4 |
…p into slewis/bootload-tool
Have incorporated @RaiBearG's CLI help/args feedback now, so I think this should be good to go once the CI all passes. 🎉 |
Still a WIP but opening now in case anyone has feedback on the overall design. This turned out to be a bit of a bigger refactor than I was hoping, but I think it has made it a bit cleaner. I've tested it in the CLI and in the console over TCP and updates still work but the extent of the change probably necessitates properly rerunning the UAT for updates. 😬
The ugliest thing about this at the moment is that there isn't really any nice way to show proper progress. We can get a nice progress bar from the FileIO upload of the binary, but all progress post that comes from MsgLogs from the device. This is true in the console itself too, but IMO looks dodgier when run on the CLI. At the moment I'm just printing everything to the console so it looks like this:
But I was thinking maybe it would be nice if we could keep some sort of rolling buffer of the last 5-10 log messages so that users can still see that progress is happening without having all the logs spewed out at them. I don't think parsing the logs is worth the headache - each flash partition gets its own progress and the output format looks like its changed slightly between v2.4 and v3.0 on the Piksi.
Still todo: