mirror of
https://github.com/meshtastic/firmware.git
synced 2025-10-28 15:22:55 +00:00
Allow vibra or buzzer only notifications to obey cutoff (#8342)
* Allow vibra or buzzer only notifications to obey cutoff * Update src/modules/ExternalNotificationModule.cpp Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Ben Meadors <benmmeadors@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
parent
153cf65214
commit
b682ab3967
@ -94,8 +94,8 @@ int32_t ExternalNotificationModule::runOnce()
|
|||||||
// audioThread->isPlaying() also handles actually playing the RTTTL, needs to be called in loop
|
// audioThread->isPlaying() also handles actually playing the RTTTL, needs to be called in loop
|
||||||
isRtttlPlaying = isRtttlPlaying || audioThread->isPlaying();
|
isRtttlPlaying = isRtttlPlaying || audioThread->isPlaying();
|
||||||
#endif
|
#endif
|
||||||
if ((nagCycleCutoff < millis()) && !isRtttlPlaying) {
|
if ((nagCycleCutoff <= millis())) {
|
||||||
// let the song finish if we reach timeout
|
// Turn off external notification immediately when timeout is reached, regardless of song state
|
||||||
nagCycleCutoff = UINT32_MAX;
|
nagCycleCutoff = UINT32_MAX;
|
||||||
LOG_INFO("Turning off external notification: ");
|
LOG_INFO("Turning off external notification: ");
|
||||||
for (int i = 0; i < 3; i++) {
|
for (int i = 0; i < 3; i++) {
|
||||||
@ -103,7 +103,6 @@ int32_t ExternalNotificationModule::runOnce()
|
|||||||
externalTurnedOn[i] = 0;
|
externalTurnedOn[i] = 0;
|
||||||
LOG_INFO("%d ", i);
|
LOG_INFO("%d ", i);
|
||||||
}
|
}
|
||||||
LOG_INFO("");
|
|
||||||
#ifdef HAS_I2S
|
#ifdef HAS_I2S
|
||||||
// GPIO0 is used as mclk for I2S audio and set to OUTPUT by the sound library
|
// GPIO0 is used as mclk for I2S audio and set to OUTPUT by the sound library
|
||||||
// T-Deck uses GPIO0 as trackball button, so restore the mode
|
// T-Deck uses GPIO0 as trackball button, so restore the mode
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user