mirror of
https://github.com/meshtastic/firmware.git
synced 2025-04-25 01:42:15 +00:00
Opposite logic for use_preset based channel name (#1871)
This commit is contained in:
parent
0091863888
commit
d6c9327aef
@ -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
|
// 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
|
// the app fucked up and forgot to set channelSettings.name
|
||||||
|
|
||||||
if (config.lora.use_preset)
|
if (config.lora.use_preset) {
|
||||||
channelName = "Custom";
|
|
||||||
else
|
|
||||||
switch (config.lora.modem_preset) {
|
switch (config.lora.modem_preset) {
|
||||||
case Config_LoRaConfig_ModemPreset_SHORT_SLOW:
|
case Config_LoRaConfig_ModemPreset_SHORT_SLOW:
|
||||||
channelName = "ShortSlow";
|
channelName = "ShortSlow";
|
||||||
@ -247,6 +245,10 @@ const char *Channels::getName(size_t chIndex)
|
|||||||
channelName = "Invalid";
|
channelName = "Invalid";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
channelName = "Custom";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return channelName;
|
return channelName;
|
||||||
|
Loading…
Reference in New Issue
Block a user