mirror of
https://github.com/meshtastic/firmware.git
synced 2026-10-09 14:41:19 -04:00
Fix: Not being able to stop Ext. Notification nagging for screenless devices (#4899)
* Move logic up to button thread for screen-less devices * Comment doesn't apply * Fiddy --------- Co-authored-by: Thomas Göttgens <tgoettgens@gmail.com>
This commit is contained in:
1 parent
dcb2707d94
commit
403e5c304e
2 files changed
+6
-7
No files matched your search
@@ -124,6 +124,11 @@ int32_t ButtonThread::runOnce()
|
||||
switch (btnEvent) {
|
||||
case BUTTON_EVENT_PRESSED: {
|
||||
LOG_BUTTON("press!\n");
|
||||
// If a nag notification is running, stop it and prevent other actions
|
||||
if (moduleConfig.external_notification.enabled && (externalNotificationModule->nagCycleCutoff != UINT32_MAX)) {
|
||||
externalNotificationModule->stopNow();
|
||||
return 50;
|
||||
}
|
||||
#ifdef BUTTON_PIN
|
||||
if (((config.device.button_gpio ? config.device.button_gpio : BUTTON_PIN) !=
|
||||
moduleConfig.canned_message.inputbroker_pin_press) ||
|
||||
|
||||
Reference in new issue
Block a user