Opposite logic for use_preset based channel name (#1871)

pull/1873/head
Ben Meadors 2022-10-29 11:40:05 -05:00 zatwierdzone przez GitHub
rodzic 0091863888
commit d6c9327aef
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 5 dodań i 3 usunięć

Wyświetl plik

@ -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;