Repository navigation
Fix Bluetooth worker panic when picking Ambient mode on devices without ambient controls - #5
Open
alfiyansys wants to merge 2 commits into
Open
alfiyansys wants to merge 2 commits into
alfiyansys wants to merge 2 commits into
Conversation
openscq30-lib panics instead of returning an error when asked to write a setting the model does not register. The tray's Ambient mode menu is always enabled while connected, so picking it on earbuds without ambient modes (e.g. K20i) crashed the Bluetooth worker. Drop SetListeningMode and SetAmbientLevel when AmbientSoundMode is absent. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…controls TrayState now carries has_ambient (manual ranges or at least one listening mode), computed in the GUI and in --tray-only mode, and the submenu is enabled only when connected and has_ambient is true. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
3 of 5 tasks
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
openscq30-libpanics (rather than returning an error) when asked to write a setting the device model has not registered. The tray's Ambient mode menu was always enabled, so choosing an entry on earbuds without ambient modes killed the Bluetooth worker thread and the app lost its connection.openscq30-lib.Test plan
cargo fmt --all -- --check,cargo clippy --all-targets --all-features -- -D warnings,cargo test --all-targets