mirror of
https://github.com/meshtastic/firmware.git
synced 2026-01-15 14:27:19 +00:00
Screenless Devices want to mute too! (#9210)
* Screenless Devices want to mute too! * Add logging for actions * Gate to screenless devices only * WisMesh Tag was missing HAS_SCREEN 0 --------- Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
This commit is contained in:
@@ -248,7 +248,21 @@ int32_t ButtonThread::runOnce()
|
||||
this->notifyObservers(&evt);
|
||||
playComboTune();
|
||||
break;
|
||||
|
||||
#if !HAS_SCREEN
|
||||
case 4:
|
||||
if (moduleConfig.external_notification.enabled && externalNotificationModule) {
|
||||
externalNotificationModule->setMute(!externalNotificationModule->getMute());
|
||||
IF_SCREEN(if (!externalNotificationModule->getMute()) externalNotificationModule->stopNow();)
|
||||
if (externalNotificationModule->getMute()) {
|
||||
LOG_INFO("Temporarily Muted");
|
||||
play4ClickDown(); // Disable tone
|
||||
} else {
|
||||
LOG_INFO("Unmuted");
|
||||
play4ClickUp(); // Enable tone
|
||||
}
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
// No valid multipress action
|
||||
default:
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user