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

Add support for flashing the lighthouse deck FW from the bootloader dialog #479

Merged
merged 8 commits into from
Mar 11, 2021

Conversation

krichardsson
Copy link
Contributor

@krichardsson krichardsson commented Mar 9, 2021

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:

@krichardsson krichardsson changed the title Dev deck flashing Add support for flashing the lighthouse deck FW from the bootloader dialog Mar 9, 2021
Copy link
Contributor

@jonasdn jonasdn left a 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] == '':
Copy link
Contributor

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'):
Copy link
Contributor

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'):

Comment on lines -189 to -193
self._auto_reconnect_enabled = Config().get("auto_reconnect")
self.autoReconnectCheckBox.toggled.connect(
self._auto_reconnect_changed)
self.autoReconnectCheckBox.setChecked(Config().get("auto_reconnect"))

Copy link
Contributor

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?

@ataffanel ataffanel merged commit 93158ef into master Mar 11, 2021
@ataffanel ataffanel deleted the dev_deck_flashing branch March 11, 2021 14:20
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.

3 participants