Skip to content

Improved R1 Neo & muzi-base buzzer beeps for GPS on/off#8870

Merged
thebentern merged 2 commits into
meshtastic:developfrom
simon-muzi:develop
Dec 8, 2025
Merged

Improved R1 Neo & muzi-base buzzer beeps for GPS on/off#8870
thebentern merged 2 commits into
meshtastic:developfrom
simon-muzi:develop

Conversation

@simon-muzi

Copy link
Copy Markdown
Contributor

Matched the resonant frequency of the hardware buzzer to maximize volume for the turn on beep.

Further distinguished ON beep from OFF beep, making it easier for users to understand the state change.

Matched the resonant frequency of the hardware buzzer to maximize volume for the turn on beep.

Further distinguished ON beep from OFF beep, making it easier for users to understand the state change.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances the GPS on/off auditory feedback for R1_NEO and MUZI_BASE hardware by optimizing buzzer frequencies and creating more distinct sound patterns.

  • Added hardware-specific buzzer melodies that match the resonant frequency of the hardware for maximum volume
  • Introduced new note frequencies (F5, G6, E7) and durations (1/16 note) for richer sound patterns
  • Differentiated GPS enable/disable beeps with unique ascending (enable) and descending (disable) melodies

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/buzz/buzz.cpp
};

// Some common frequencies.
#define NOTE_SILENT 1

Copilot AI Dec 5, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The name NOTE_SILENT is misleading. The value 1 represents a 1 Hz frequency, not silence. A 1 Hz frequency is extremely low and effectively inaudible to humans, but it's not the same as silence (which would typically be represented by 0 Hz or a special value that stops tone generation). Consider renaming to NOTE_INAUDIBLE or using a value of 0 if the underlying tone generation supports it.

Suggested change
#define NOTE_SILENT 1
#define NOTE_SILENT 0

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was avoiding using 0Hz as I had a concern it may break the signal generation code but didn't look into it

Comment thread src/buzz/buzz.cpp
Comment on lines +92 to +94
ToneDuration melody[] = {{NOTE_B4, DURATION_1_16}, {NOTE_B4, DURATION_1_16}, {NOTE_SILENT, DURATION_1_8},
{NOTE_F3, DURATION_1_16}, {NOTE_F3, DURATION_1_16}, {NOTE_SILENT, DURATION_1_8},
{NOTE_C3, DURATION_1_1}, {NOTE_SILENT, DURATION_1_1}};

Copilot AI Dec 5, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Inconsistent whitespace around braces in the melody array. The spacing between {NOTE_B4, DURATION_1_16} elements uses 2 spaces while {NOTE_SILENT, DURATION_1_8} elements use 3 spaces. Consider using consistent spacing for better readability, e.g., all 2-space separators.

Suggested change
ToneDuration melody[] = {{NOTE_B4, DURATION_1_16}, {NOTE_B4, DURATION_1_16}, {NOTE_SILENT, DURATION_1_8},
{NOTE_F3, DURATION_1_16}, {NOTE_F3, DURATION_1_16}, {NOTE_SILENT, DURATION_1_8},
{NOTE_C3, DURATION_1_1}, {NOTE_SILENT, DURATION_1_1}};
ToneDuration melody[] = {{NOTE_B4, DURATION_1_16}, {NOTE_B4, DURATION_1_16}, {NOTE_SILENT, DURATION_1_8},
{NOTE_F3, DURATION_1_16}, {NOTE_F3, DURATION_1_16}, {NOTE_SILENT, DURATION_1_8},
{NOTE_C3, DURATION_1_1}, {NOTE_SILENT, DURATION_1_1}};

Copilot uses AI. Check for mistakes.

@Xaositek Xaositek left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on my R1 Neo - no issues found.

@thebentern thebentern merged commit 5671e9d into meshtastic:develop Dec 8, 2025
83 of 84 checks passed
scobert969 pushed a commit to zeropt/meshtastic-firmware that referenced this pull request Dec 22, 2025
)

Matched the resonant frequency of the hardware buzzer to maximize volume for the turn on beep.

Further distinguished ON beep from OFF beep, making it easier for users to understand the state change.
jeek pushed a commit to jeek/Meshtastic-Exploiteers-Hacker-Pager that referenced this pull request Jun 30, 2026
)

Matched the resonant frequency of the hardware buzzer to maximize volume for the turn on beep.

Further distinguished ON beep from OFF beep, making it easier for users to understand the state change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants