Skip to content

Commit

Permalink
Bug fixed in ExternalNotificationModule (meshtastic#5375)
Browse files Browse the repository at this point in the history
While `nagging` setExternalState wasn't written to Buzzer & Vibra so output was never toggled.

Possible fix for meshtastic#5348
  • Loading branch information
gjelsoe authored and fifieldt committed Dec 14, 2024
1 parent 0470094 commit 1114430
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/modules/ExternalNotificationModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,13 @@ int32_t ExternalNotificationModule::runOnce()
if (externalTurnedOn[1] + (moduleConfig.external_notification.output_ms ? moduleConfig.external_notification.output_ms
: EXT_NOTIFICATION_MODULE_OUTPUT_MS) <
millis()) {
setExternalState(0, !getExternal(1));
setExternalState(1, !getExternal(1));
}
if (externalTurnedOn[2] + (moduleConfig.external_notification.output_ms ? moduleConfig.external_notification.output_ms
: EXT_NOTIFICATION_MODULE_OUTPUT_MS) <
millis()) {
setExternalState(0, !getExternal(2));
LOG_DEBUG("EXTERNAL 2 %d compared to %d", externalTurnedOn[2]+moduleConfig.external_notification.output_ms, millis());
setExternalState(2, !getExternal(2));
}
#if defined(HAS_NCP5623) || defined(RGBLED_RED) || defined(HAS_NEOPIXEL) || defined(UNPHONE)
red = (colorState & 4) ? brightnessValues[brightnessIndex] : 0; // Red enabled on colorState = 4,5,6,7
Expand Down

0 comments on commit 1114430

Please sign in to comment.