small refactoring
This commit is contained in:
parent
17605de9b4
commit
a04d49fb14
|
|
@ -72,15 +72,9 @@ namespace LoRa_Utils {
|
|||
#endif
|
||||
String loraCountryFreq;
|
||||
switch (loraIndex) {
|
||||
case 0:
|
||||
loraCountryFreq = "EU/WORLD";
|
||||
break;
|
||||
case 1:
|
||||
loraCountryFreq = "POLAND";
|
||||
break;
|
||||
case 2:
|
||||
loraCountryFreq = "UK";
|
||||
break;
|
||||
case 0: loraCountryFreq = "EU/WORLD"; break;
|
||||
case 1: loraCountryFreq = "POLAND"; break;
|
||||
case 2: loraCountryFreq = "UK"; break;
|
||||
}
|
||||
String currentLoRainfo = "LoRa " + loraCountryFreq + " / Freq: " + String(currentLoRaType->frequency) + " / SF:" + String(currentLoRaType->spreadingFactor) + " / CR: " + String(currentLoRaType->codingRate4);
|
||||
logger.log(logging::LoggerLevel::LOGGER_LEVEL_INFO, "LoRa", currentLoRainfo.c_str());
|
||||
|
|
|
|||
|
|
@ -215,14 +215,12 @@ namespace MENU_Utils {
|
|||
break;
|
||||
|
||||
case 210: // 2.Configuration ---> Change Frequency
|
||||
if (loraIndex == 0) {
|
||||
freqChangeWarning = " Eu --> PL";
|
||||
} else if (loraIndex == 1) {
|
||||
freqChangeWarning = " PL --> UK";
|
||||
} else if (loraIndex == 2) {
|
||||
freqChangeWarning = " UK --> Eu";
|
||||
switch (loraIndex) {
|
||||
case 0: freqChangeWarning = " Eu --> PL"; break;
|
||||
case 1: freqChangeWarning = " PL --> UK"; break;
|
||||
case 2: freqChangeWarning = " UK --> Eu"; break;
|
||||
}
|
||||
show_display("LORA__FREQ", ""," Confirm Change?",freqChangeWarning,"","<Back Select>");
|
||||
show_display("LORA__FREQ", ""," Confirm Change?", freqChangeWarning, "", "<Back Select>");
|
||||
break;
|
||||
|
||||
case 220: // 2.Configuration ---> Display ---> ECO Mode
|
||||
|
|
@ -523,12 +521,10 @@ namespace MENU_Utils {
|
|||
} else {
|
||||
thirdRowMainMenu = String(Utils::getMaidenheadLocator(gps.location.lat(), gps.location.lng(), 8));
|
||||
thirdRowMainMenu += " LoRa[";
|
||||
if (loraIndex == 0) {
|
||||
thirdRowMainMenu += "Eu]";
|
||||
} else if (loraIndex == 1) {
|
||||
thirdRowMainMenu += "PL]";
|
||||
} else if (loraIndex == 2) {
|
||||
thirdRowMainMenu += "UK]";
|
||||
switch (loraIndex) {
|
||||
case 0: thirdRowMainMenu += "Eu]"; break;
|
||||
case 1: thirdRowMainMenu += "PL]"; break;
|
||||
case 2: thirdRowMainMenu += "UK]"; break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -631,12 +627,12 @@ namespace MENU_Utils {
|
|||
} else {
|
||||
sixthRowMainMenu = "No Battery Connected" ;
|
||||
}
|
||||
show_display(String(firstRowMainMenu),
|
||||
String(secondRowMainMenu),
|
||||
String(thirdRowMainMenu),
|
||||
String(fourthRowMainMenu),
|
||||
String(fifthRowMainMenu),
|
||||
String(sixthRowMainMenu));
|
||||
show_display(firstRowMainMenu,
|
||||
secondRowMainMenu,
|
||||
thirdRowMainMenu,
|
||||
fourthRowMainMenu,
|
||||
fifthRowMainMenu,
|
||||
sixthRowMainMenu);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue