mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-13 22:32:27 +00:00
* Resolve #8887 * Update src/modules/ExternalNotificationModule.cpp Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update src/modules/ExternalNotificationModule.cpp Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * use canBuzz method * trunk fmt --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -168,7 +168,7 @@ int32_t ExternalNotificationModule::runOnce()
|
|||||||
delay = EXT_NOTIFICATION_FAST_THREAD_MS;
|
delay = EXT_NOTIFICATION_FAST_THREAD_MS;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef T_WATCH_S3
|
#if defined(T_WATCH_S3) || defined(T_LORA_PAGER)
|
||||||
drv.go();
|
drv.go();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@@ -541,6 +541,19 @@ ProcessMessage ExternalNotificationModule::handleReceived(const meshtastic_MeshP
|
|||||||
(!isBroadcast(mp.to) && isToUs(&mp))) {
|
(!isBroadcast(mp.to) && isToUs(&mp))) {
|
||||||
// Buzz if buzzer mode is not in DIRECT_MSG_ONLY or is DM to us
|
// Buzz if buzzer mode is not in DIRECT_MSG_ONLY or is DM to us
|
||||||
isNagging = true;
|
isNagging = true;
|
||||||
|
#ifdef T_LORA_PAGER
|
||||||
|
if (canBuzz()) {
|
||||||
|
drv.setWaveform(0, 16); // Long buzzer 100%
|
||||||
|
drv.setWaveform(1, 0); // Pause
|
||||||
|
drv.setWaveform(2, 16);
|
||||||
|
drv.setWaveform(3, 0);
|
||||||
|
drv.setWaveform(4, 16);
|
||||||
|
drv.setWaveform(5, 0);
|
||||||
|
drv.setWaveform(6, 16);
|
||||||
|
drv.setWaveform(7, 0);
|
||||||
|
drv.go();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
if (!moduleConfig.external_notification.use_pwm && !moduleConfig.external_notification.use_i2s_as_buzzer) {
|
if (!moduleConfig.external_notification.use_pwm && !moduleConfig.external_notification.use_i2s_as_buzzer) {
|
||||||
setExternalState(2, true);
|
setExternalState(2, true);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user