Repository navigation
Keep mouse battery levels up to date with device notifications - #1389
Merged
Merged
Conversation
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.
Summary
Mouse battery readings could remain stale because Bluetooth updates depended on infrequent activity-triggered queries, while receiver battery values were primarily refreshed during device discovery.
Read the battery once per connection, then update it from device notifications.
Changes
Validation
Tested with an MX Master 3S B:
Limitations
The percentage remained at 85% during the hardware tests; charging-state transitions and notification delivery were verified, but a percentage increase was not observed.
Hardware testing used transport probes, including the production HID++ observer and GATT adapter. The installed app's complete status-bar UI flow was not exercised.
Notification availability depends on the device. This change does not add periodic battery polling for devices that lack notification support.
Related issues