Feature/2626 distinct buzzer notifications#2665
Open
jocasmark wants to merge 7 commits into
Open
Conversation
Give advert and toggleable settings (buzzer, GPS) their own short, easily distinguishable buzzer tones so users of buzzer-only devices (e.g. T1000E) can tell events apart by ear. - genericBuzzer::playToggle(count, enabled): generic, opt-in helper for the count/direction convention (N notes ascending if enabled, descending if disabled). Lives next to play()/startup()/shutdown(); any caller can use it, nothing forces it. - AbstractUITask: virtual notifyToggle(count, enabled) with an empty default — subclasses that don't care don't override. UIEventType only gains one event-shaped entry (advertSent), so it doesn't grow one entry per toggleable setting. - ui-orig / ui-new / ui-tiny: notify() handles fixed events; notifyToggle() is a one-line delegate to buzzer.playToggle(). Button presses, home-page actions, toggleBuzzer (3 notes) and toggleGPS (4 notes) route through notifyToggle(). - Preserve existing silent-when-connected behavior for incoming contact messages: when the companion app is connected it handles user notification, so the device stays quiet. - Fix mute-confirmation bug: hold mute until the off-tone finishes so the user actually hears it when disabling the buzzer.
…t-buzzer-notifications
Adjusts the duration and tempo of several buzzer melodies to make them more perceptible. Specifically, the advert sent and generic toggle sounds are modified with longer note durations and slower tempos, improving their clarity on typical small piezo speakers.
Ensures the RTTTL player has a persistent buffer for melody data. The player stores a pointer to the melody, which requires the buffer to outlive the function call. A static buffer guarantees this, preventing issues from accessing deallocated memory. This is safe as concurrent playback is not supported.
…t-buzzer-notifications
Simplifies the explanation for using a static buffer for buzzer melodies.
Explains the distinct tones used on companion-radio devices for actions like toggle confirmations. Improves user understanding of audio feedback, especially on button-only devices.
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.
Feature Request: #2626
Adds uniform buzzer feedback so users get distinct audible confirmation of what they toggled, without growing
UIEventTypeper setting.Convention
Changes
genericBuzzer::playToggle(count, enabled)renders the melody from the convention. Generic and opt-in.UIEventType::advertSentplays a short sound when an advert is sent from the UI.AbstractUITask::notifyToggle(count, enabled)virtual (empty default).ui-orig,ui-new,ui-tiny: advert page,toggleBuzzer(3),toggleGPS(4).quiet(true)cuts the buzzer.Note
NonBlockingRtttl::begin()only stores a pointer to the melody, so the generated buffer inplayToggle()uses static storage to outlive playback.Validation
pio run -e t1000e_companion_radio_usbpio run -e Heltec_E213_companion_radio_ble