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

Make backup on flash an option #4360

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

haslinghuis
Copy link
Member

@haslinghuis haslinghuis commented Feb 25, 2025

This pull request includes several changes to improve the firmware flashing process and enhance user options. The most important changes include adding new backup options before flashing firmware, modifying the firmware flasher initialization to handle these new options, and updating the user interface to include these options.

Improvements to firmware flashing process:

Modifications to firmware flasher initialization:

  • Updated firmware_flasher.initialize function to include backup options handling:
    • Added logic to check backupOnFlash configuration and execute appropriate actions [1] [2]

Enhancements to user interface:

  • Added backup options to the options tab in src/tabs/options.html:
    • Included a dropdown for selecting backup behavior before flashing
  • Updated options.js to initialize the new backup options:
    • Added options.initBackupOnFlash function to handle backup configuration [1] [2]

These changes ensure that users have more control over the backup process when flashing firmware, enhancing both functionality and user experience.

image

@haslinghuis haslinghuis added this to the 11.0 milestone Feb 25, 2025
@haslinghuis haslinghuis self-assigned this Feb 25, 2025
Copy link

netlify bot commented Feb 25, 2025

Deploy Preview for origin-betaflight-app ready!

Name Link
🔨 Latest commit 52d8ed2
🔍 Latest deploy log https://app.netlify.com/sites/origin-betaflight-app/deploys/67c0aaf34f33390008e08a83
😎 Deploy Preview https://deploy-preview-4360.dev.app.betaflight.com
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@haslinghuis haslinghuis force-pushed the backup branch 2 times, most recently from 4ce022e to c3120c2 Compare February 25, 2025 23:08
@nerdCopter

This comment was marked as outdated.

@haslinghuis
Copy link
Member Author

Sorry need to move default to main.js (as now it adds default in option).

@nerdCopter

This comment was marked as outdated.

@nerdCopter
Copy link
Member

nerdCopter commented Feb 26, 2025

i don't know that i would keep this option ON. (but also like master's current option)
what are some alternatives?

  • backup button on bottom of screen before Exit DFU?
  • new left-menu tab Backup/Restore?

@haslinghuis
Copy link
Member Author

haslinghuis commented Feb 26, 2025

Perhaps:

  • new users rejecting the dialog - not having a backup when flashing new firmware ==> force backup (and keep option ?)
  • advanced users want to backup in certain situations ==> keep the dialog (and option so dialog can be disabled)

Not for now:
Thinking about a window for complete Backup - Flash - Restore process (need to keep track of flash process and exceptions)

@nerdCopter
Copy link
Member

nerdCopter commented Feb 26, 2025

  • meanwhile, is it possible to have master's backup/ignore dialog every flash?
  • maybe the option to turn this dialog off
  • maybe this is best alternative, but have the dialog more "alert"

@haslinghuis haslinghuis force-pushed the backup branch 5 times, most recently from 220c09d to 8220ca9 Compare February 26, 2025 18:37
@haslinghuis
Copy link
Member Author

@nerdCopter think have addressed your review

@haslinghuis haslinghuis force-pushed the backup branch 3 times, most recently from ccb7ce9 to 4e4f466 Compare February 26, 2025 18:59
@nerdCopter
Copy link
Member

nerdCopter commented Feb 26, 2025

please set ask before backup as default

edit: i think enabled by default, pardon my change of mind, it was when the option-save was broken (displaying disabled).

@nerdCopter

This comment was marked as outdated.

@haslinghuis
Copy link
Member Author

@nerdCopter should overwrite once set. Saves for me (changing or refreshing tab in browser)

@nerdCopter

This comment was marked as outdated.

@haslinghuis
Copy link
Member Author

Hmmm, works locally but not in preview 🤯

@nerdCopter

This comment was marked as outdated.

@haslinghuis
Copy link
Member Author

Seems to work now after we accept this dialog

image

@nerdCopter
Copy link
Member

nerdCopter commented Feb 26, 2025

dd00823e
seems to work as expected. let's ask on discord about default = enable vs ask.

edit: in retrospect, i think enabled by default

@nerdCopter
Copy link
Member

77d4e9ad working. request others re-testing.

@haslinghuis
Copy link
Member Author

Rebased on master

@haslinghuis haslinghuis requested a review from limonspb February 27, 2025 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants