Fix 4 digits

This commit is contained in:
Armel FAUVEAU committed 2026-02-11 19:54:58 +01:00
1 parent fa7537d539
commit 5ccb6cd7ff
2 files changed
+4 -4

No files matched your search

+2 -2
View File
@@ -54,13 +54,13 @@ void UI_GenerateChannelStringEx(char *pString, const bool bShowPrefix, const uin
if (bShowPrefix) {
// BUG here? Prefixed NULLs are allowed
sprintf(pString, "CH-%03u", ChannelNumber + 1);
sprintf(pString, "CH-%04u", ChannelNumber + 1);
} else if (ChannelNumber == MR_CHANNEL_LAST + 1) {
strcpy(pString, "None");
} else if (ChannelNumber == 0xFFFF) {
strcpy(pString, "NULL");
} else {
sprintf(pString, "%03u", ChannelNumber + 1);
sprintf(pString, "%04u", ChannelNumber + 1);
}
}
+2 -2
View File
@@ -1007,7 +1007,7 @@ void UI_DisplayMain(void)
break;
case MDF_CHANNEL: // show the channel number
sprintf(String, "CH-%03u", gEeprom.ScreenChannel[vfo_num] + 1);
sprintf(String, "CH-%04u", gEeprom.ScreenChannel[vfo_num] + 1);
UI_PrintString(String, 36, 0, line, 8);
break;
@@ -1017,7 +1017,7 @@ void UI_DisplayMain(void)
SETTINGS_FetchChannelName(String, gEeprom.ScreenChannel[vfo_num]);
if (String[0] == 0)
{ // no channel name, show the channel number instead
sprintf(String, "CH-%03u", gEeprom.ScreenChannel[vfo_num] + 1);
sprintf(String, "CH-%04u", gEeprom.ScreenChannel[vfo_num] + 1);
}
if (gEeprom.CHANNEL_DISPLAY_MODE == MDF_NAME) {