Add double-press mute button for HCR audio#71
Merged
thePunderWoman merged 1 commit intomainfrom Apr 29, 2026
Merged
Conversation
Introduces mutebutton= config option (1–9, same numbering as altbtn). Double-pressing the configured button sets all HCR channels to 0; a second double-press restores the previous per-channel volumes. Moving the volume wheel while muted automatically unmutes. May share the same button as altbtn — a quick double-tap fires mute while holding acts as the alt modifier. Double-press window is 400ms. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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
mutebutton=Nconfig option (1–9, same button numbering asaltbtn) that toggles HCR mute on double-pressaltbtn— a quick double-tap fires mute while holding acts as the alt modifierAmidalaController::DOUBLE_PRESS_MS)mutebutton=0(default, disabled)Changed files
include/params.h—mutebuttonfield + defaultsrc/config.cpp— parsemutebutton=include/audio.h/src/audio.cpp—fSavedVolV/A/Btracks live channel volumes;restoreVolumes()helper;toggleMute();setVolumeNoResponse/setAltVolumeNoResponseunmute on wheel inputinclude/controller.h—noteMuteBtnUp()double-press timer logic;resetMutePressTimer();toggleMute()forwarder;DOUBLE_PRESS_MSconstant;fLastMuteBtnUpTimestatesrc/drive_controllers.cpp— double-press detection wired into bothDriveController(buttons 1–5) andDomeController(buttons 6–9); timer reset on disconnectexample_config.txt— documentsmutebutton=nearaltbtn=Test plan
pio test -e native— all 448 tests pass (new tests intest_audioandtest_processconfig)pio run— firmware builds cleanmutebutton == altbtn— hold fires alt modifier, quick double-tap fires mute🤖 Generated with Claude Code