mirror of
https://github.com/armel/uv-k1-k5v3-firmware-custom.git
synced 2026-10-02 03:15:37 +00:00
Improve one and two-letter scan list names (issue #206)
This commit is contained in:
1 parent
d0fdca4dc1
commit
eaa05f107e
3 files changed
+4
-4
No files matched your search
+1
-1
@@ -976,7 +976,7 @@ void UI_DisplayMain(void)
|
||||
const char *name = gListName[countList - 1];
|
||||
|
||||
// If name is empty/invalid, display number
|
||||
if (name[0] == '\0' || name[0] == '\xff' || name[0] == ' ') {
|
||||
if (name[0] == '\0' || name[0] == '\xff') {
|
||||
sprintf(String, "%02d", countList);
|
||||
xStart = 117; // 2-digit number aligned right
|
||||
xDisplay = 119;
|
||||
|
||||
+2
-2
@@ -976,7 +976,7 @@ void UI_DisplayMenu(void)
|
||||
const char *name = gListName[gSubMenuSelection - 1];
|
||||
|
||||
// If first character is empty/invalid, display "N/A"
|
||||
if (name[0] == '\0' || name[0] == '\xff' || name[0] == ' ')
|
||||
if (name[0] == '\0' || name[0] == '\xff')
|
||||
sprintf(String, "%02u", gSubMenuSelection);
|
||||
else
|
||||
sprintf(String, "%02u (%.3s)", gSubMenuSelection, name);
|
||||
@@ -989,7 +989,7 @@ void UI_DisplayMenu(void)
|
||||
else {
|
||||
const char *name = gListName[gSubMenuSelection - 1];
|
||||
// If first character is empty/invalid, display "N/A"
|
||||
if (name[0] == '\0' || name[0] == '\xff' || name[0] == ' ')
|
||||
if (name[0] == '\0' || name[0] == '\xff')
|
||||
sprintf(String, "%02u", gSubMenuSelection);
|
||||
else
|
||||
sprintf(String, "%02u (%.3s)", gSubMenuSelection, name);
|
||||
|
||||
+1
-1
@@ -114,7 +114,7 @@ void UI_DisplayStatus()
|
||||
const char *name = gListName[gEeprom.SCAN_LIST_DEFAULT - 1];
|
||||
|
||||
// Check if name is valid
|
||||
bool nameValid = (name[0] != '\0' && name[0] != '\xff' && name[0] != ' ');
|
||||
bool nameValid = (name[0] != '\0' && name[0] != '\xff');
|
||||
|
||||
// Format the string
|
||||
if (nameValid) {
|
||||
|
||||
Reference in new issue
Block a user