diff --git a/src/graphics/Screen.cpp b/src/graphics/Screen.cpp index 6a9e3767..340feb91 100644 --- a/src/graphics/Screen.cpp +++ b/src/graphics/Screen.cpp @@ -1518,9 +1518,7 @@ void DebugInfo::drawFrameSettings(OLEDDisplay *display, OLEDDisplayUiState *stat auto mode = ""; - Config_LoRaConfig &loraConfig = config.payloadVariant.lora; - - switch (loraConfig.modem_preset) { + switch (config.payloadVariant.lora.modem_preset) { case Config_LoRaConfig_ModemPreset_ShortSlow: mode = "ShortSlow"; break; diff --git a/src/mesh/Channels.cpp b/src/mesh/Channels.cpp index 2edcf19b..291145a8 100644 --- a/src/mesh/Channels.cpp +++ b/src/mesh/Channels.cpp @@ -203,7 +203,6 @@ void Channels::setChannel(const Channel &c) const char *Channels::getName(size_t chIndex) { - Config_LoRaConfig &loraConfig = config.payloadVariant.lora; // Convert the short "" representation for Default into a usable string const ChannelSettings &channelSettings = getByIndex(chIndex).settings; const char *channelName = channelSettings.name; @@ -211,10 +210,10 @@ 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 (loraConfig.bandwidth != 0) + if (config.payloadVariant.lora.bandwidth != 0) channelName = "Unset"; else - switch (loraConfig.modem_preset) { + switch (config.payloadVariant.lora.modem_preset) { case Config_LoRaConfig_ModemPreset_ShortSlow: channelName = "ShortSlow"; break;