feat: show power consumption in power menu - #71
Open
4RH1T3CT0R7 wants to merge 2 commits into
Open
Conversation
DrZlo13
approved these changes
Mar 19, 2026
DrZlo13
self-requested a review
March 19, 2026 23:39
DrZlo13
requested changes
Mar 19, 2026
An optional line between the title and the items, separated from them by a border. Unlike the title, the status holds a value that changes every few seconds, so it lives in a fixed buffer in the view model instead of on the heap: formatting straight into it allocates nothing and keeps the pointer Clay captures during layout valid. Also moves the popup_menu_is_visible prototype from gui_i.h to the public header, now that callers outside the gui service need it.
Show the INA219 voltage, current and power in the power menu status line. The readings are refreshed on the desktop power update event while the menu is open, and skipped when the INA219 is not initialized. Clear the menu visibility on scene exit, otherwise the refresh keeps running after the menu is closed from an item callback. Closes flipperdevices#23
Contributor
Author
|
The power menu moved into the desktop scenes since I opened this, so rebasing turned into a reimplementation on the new PopupMenu: optional status line under the title, with the border under it. No allocation now, the model formats into a fixed It refreshes on the 5s power event rather than a 1s timer, since scenes can't reach the event loop. Each refresh is three blocking round-trips to the power thread; |
4RH1T3CT0R7
force-pushed
the
feature/23-power-consumption-menu
branch
from
August 24, 2026 13:27
8eae66a to
1bde37d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #23