try-fix crash

This commit is contained in:
mverch67 2024-09-24 14:07:49 +02:00
parent 67f363b659
commit a84276ccfa
2 changed files with 2 additions and 2 deletions

View File

@ -177,7 +177,7 @@ int32_t ExternalNotificationModule::runOnce()
} }
#endif #endif
// now let the PWM buzzer play // now let the PWM buzzer play
if (moduleConfig.external_notification.use_pwm) { if (moduleConfig.external_notification.use_pwm && config.device.buzzer_gpio) {
if (rtttl::isPlaying()) { if (rtttl::isPlaying()) {
rtttl::play(); rtttl::play();
} else if (isNagging && (nagCycleCutoff >= millis())) { } else if (isNagging && (nagCycleCutoff >= millis())) {

View File

@ -32,7 +32,7 @@ class ExternalNotificationModule : public SinglePortModule, private concurrency:
public: public:
ExternalNotificationModule(); ExternalNotificationModule();
uint32_t nagCycleCutoff = UINT32_MAX; uint32_t nagCycleCutoff = 1;
void setExternalOn(uint8_t index = 0); void setExternalOn(uint8_t index = 0);
void setExternalOff(uint8_t index = 0); void setExternalOff(uint8_t index = 0);