From 3af831621d20d9efe4924bac0fdb85e9e1aa72a5 Mon Sep 17 00:00:00 2001 From: medentem Date: Sun, 15 Dec 2024 18:52:39 -0600 Subject: [PATCH] fallback to parameter channel value --- src/modules/NodeInfoModule.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/modules/NodeInfoModule.cpp b/src/modules/NodeInfoModule.cpp index e9b8d9f78..bb7f01545 100644 --- a/src/modules/NodeInfoModule.cpp +++ b/src/modules/NodeInfoModule.cpp @@ -58,7 +58,8 @@ void NodeInfoModule::sendOurNodeInfo(NodeNum dest, bool wantReplies, uint8_t cha // If this is a broadcast over the default channel, we can safely change this to the discovery channel if defined if (dest == NODENUM_BROADCAST && channel == 0) { int8_t discoveryChannelIdx = channels.getIndexByHash((ChannelHash)USERPREFS_CONFIG_DISCOVERY_CHANNEL_HASH); - p->channel = discoveryChannelIdx > 0 ? discoveryChannelIdx : 0; + // Fallback to primary channel if discovery channel is not found by its hash + p->channel = discoveryChannelIdx > 0 ? discoveryChannelIdx : channel; } #endif