-
Notifications
You must be signed in to change notification settings - Fork 481
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
Add support for flashing the lighthouse deck FW from the bootloader dialog #479
Conversation
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.
Nice work!
Just some nits below.
if filename != "" and filename[-4:] in (".bin", ".zip"): | ||
names = QtWidgets.QFileDialog.getOpenFileName( | ||
self, 'Release file to flash', self._helper.current_folder, "*.zip") | ||
if names[0] == '': |
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.
nit: in python empty strings are falsy
meaning this could be: if not names[0]:
filename = names[0] | ||
self._helper.current_folder = os.path.dirname(filename) | ||
|
||
if filename[-4:] in ('.zip'): |
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.
nit: this might now be more clearer as:
if filename[-4:] == '.zip':
or better yet:
if filename.endswith('.zip'):
self._auto_reconnect_enabled = Config().get("auto_reconnect") | ||
self.autoReconnectCheckBox.toggled.connect( | ||
self._auto_reconnect_changed) | ||
self.autoReconnectCheckBox.setChecked(Config().get("auto_reconnect")) | ||
|
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.
What is the reason for removing this? Could it be stated in the commit message?
Add support for flashing decks from the boot loader dialog.
Initially for the lighthouse deck, but will also work for other decks that have FW in the future.
To simplify the user experience we will remove the possibility of flashing .bin files, only .zip files will be supported. Also all flashing targets will be used when flashing and option to chose flashing targets will be removed. The user should use developer functionality (make cload) to flash a single target.
The flashing procedure will contain restart(s) in some cases. Since the boot loader dialog now also handles connections to the CF, we will remove the auto-reconnect feature to avoid and complications when re-booting.
Related issues: