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

FuriHal, drivers: rework gauge initialization routine #3912

Merged
merged 19 commits into from
Oct 6, 2024
Merged

Conversation

skotopes
Copy link
Member

@skotopes skotopes commented Sep 19, 2024

!!! Warning !!!

This PR changes gauge security settings: by default gauge will be SEALED, we only unseal it for a short period of time while doing initialization routine.
This was done to prevent configuration damage and gauge transition into state where recovery becomes complex.

Downgrade from this firmware is not possible, it will break old initialization routine, you will see [ - ] instead of battery indicator.

If you must downgrade then use https://github.com/skotopes/flipperzero_gauge_tool to unseal gauge.

What's new

  • FuriHal: rework gauge initialization, ensure that we can rec over from any kind of internal/external issue

Verification

  • Fixes issue with gauge stuck in [ - ] mode
  • Check logs, check battery stats
  • Using bqstudio, configure gauge with different profile or change settings or enter config mode

Checklist (For Reviewer)

  • PR has description of feature/bug or link to Confluence/Jira task
  • Description contains actions to verify feature/bugfix
  • I've built this code, uploaded it to the device and verified feature/bugfix

…over from any kind of internal/external issue
Copy link

github-actions bot commented Sep 19, 2024

Compiled f7 firmware for commit 80d3be6b:

Copy link

github-actions bot commented Sep 19, 2024

PVS-Studio report for commit d4aebc9c:

@skotopes skotopes changed the title FuriHal, drivers: rework gauge initialization, ensure that we can rec over from any kind of internal/external issue FuriHal, drivers: rework gauge initialization routine Sep 24, 2024
lib/drivers/bq27220.c Outdated Show resolved Hide resolved
lib/drivers/bq27220.c Outdated Show resolved Hide resolved
lib/drivers/bq27220.c Outdated Show resolved Hide resolved
lib/drivers/bq27220.c Outdated Show resolved Hide resolved
lib/drivers/bq27220.c Outdated Show resolved Hide resolved
lib/drivers/bq27220.c Outdated Show resolved Hide resolved
lib/drivers/bq27220.c Outdated Show resolved Hide resolved
lib/drivers/bq27220.c Outdated Show resolved Hide resolved
lib/drivers/bq27220.c Outdated Show resolved Hide resolved
@hedger hedger self-requested a review October 6, 2024 16:53
hedger
hedger previously approved these changes Oct 6, 2024
lib/drivers/bq27220.c Outdated Show resolved Hide resolved
@hedger hedger merged commit 0469ef0 into dev Oct 6, 2024
11 checks passed
@hedger hedger deleted the aku/gauge_fix_3000 branch October 6, 2024 18:36
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.

2 participants