From d6c9327aefaca838526c0fdc860ae8e493a7ce70 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Sat, 29 Oct 2022 11:40:05 -0500 Subject: [PATCH] Opposite logic for use_preset based channel name (#1871) --- src/mesh/Channels.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/mesh/Channels.cpp b/src/mesh/Channels.cpp index d869de752..0af92a5c9 100644 --- a/src/mesh/Channels.cpp +++ b/src/mesh/Channels.cpp @@ -218,9 +218,7 @@ const char *Channels::getName(size_t chIndex) // Per mesh.proto spec, if bandwidth is specified we must ignore modemPreset enum, we assume that in that case // the app fucked up and forgot to set channelSettings.name - if (config.lora.use_preset) - channelName = "Custom"; - else + if (config.lora.use_preset) { switch (config.lora.modem_preset) { case Config_LoRaConfig_ModemPreset_SHORT_SLOW: channelName = "ShortSlow"; @@ -247,6 +245,10 @@ const char *Channels::getName(size_t chIndex) channelName = "Invalid"; break; } + } + else { + channelName = "Custom"; + } } return channelName;