Increase FM broadcast channels, memory channels and scan lists

- Increase FM broadcast memory channels from 20 to 48
- Increase memory channels from 200 to 768
- Increase scan lists from 3 to 10
- Update internal limits, mappings and related logic accordingly
- Minor cleanups and adjustments related to these changes
This commit is contained in:
Armel FAUVEAU committed 2026-01-12 00:46:52 +01:00
1 parent 8bb2915446
commit e5ca2265e4
33 files changed
+1018 -794

No files matched your search

+36 -78
View File
@@ -63,17 +63,15 @@ const t_menu_item MenuList[] =
#ifdef ENABLE_FEAT_F4HWN
{"TXLock", MENU_TX_LOCK },
#endif
{"ScAdd1", MENU_S_ADD1 },
{"ScAdd2", MENU_S_ADD2 },
{"ScAdd3", MENU_S_ADD3 },
{"ChList", MENU_LIST_CH },
{"ChSave", MENU_MEM_CH }, // was "MEM-CH"
{"ChDele", MENU_DEL_CH }, // was "DEL-CH"
{"ChName", MENU_MEM_NAME },
{"SList", MENU_S_LIST },
{"SList1", MENU_SLIST1 },
{"SList2", MENU_SLIST2 },
{"SList3", MENU_SLIST3 },
{"ScList", MENU_S_LIST },
{"ScPri", MENU_S_PRI },
{"PriCh1", MENU_S_PRI_CH_1 },
{"PriCh2", MENU_S_PRI_CH_2 },
{"ScnRev", MENU_SC_REV },
#ifndef ENABLE_FEAT_F4HWN
#ifdef ENABLE_NOAA
@@ -787,9 +785,6 @@ void UI_DisplayMenu(void)
#endif
case MENU_BCL:
case MENU_BEEP:
case MENU_S_ADD1:
case MENU_S_ADD2:
case MENU_S_ADD3:
case MENU_STE:
case MENU_D_ST:
#ifdef ENABLE_DTMF_CALLING
@@ -810,6 +805,7 @@ void UI_DisplayMenu(void)
#endif
#ifdef ENABLE_FEAT_F4HWN
case MENU_SET_TMR:
case MENU_S_PRI:
#endif
strcpy(String, gSubMenu_OFF_ON[gSubMenuSelection]);
break;
@@ -817,23 +813,34 @@ void UI_DisplayMenu(void)
case MENU_MEM_CH:
case MENU_1_CALL:
case MENU_DEL_CH:
case MENU_S_PRI_CH_1:
case MENU_S_PRI_CH_2:
{
const bool valid = RADIO_CheckValidChannel(gSubMenuSelection, false, 0);
UI_GenerateChannelStringEx(String, valid, gSubMenuSelection);
UI_PrintString(String, menu_item_x1, menu_item_x2, 0, 8);
if (valid && !gAskForConfirmation)
{ // show the frequency so that the user knows the channels frequency
const uint32_t frequency = SETTINGS_FetchChannelFrequency(gSubMenuSelection);
sprintf(String, "%u.%05u", frequency / 100000, frequency % 100000);
UI_PrintString(String, menu_item_x1, menu_item_x2, 4, 8);
if(gSubMenuSelection == MR_CHANNELS_MAX)
{
UI_PrintString("None", menu_item_x1, menu_item_x2, 2, 8);
already_printed = true;
break;
}
else
{
const bool valid = RADIO_CheckValidChannel(gSubMenuSelection, false, 0);
SETTINGS_FetchChannelName(String, gSubMenuSelection);
UI_PrintString(String[0] ? String : "--", menu_item_x1, menu_item_x2, 2, 8);
already_printed = true;
break;
UI_GenerateChannelStringEx(String, valid, gSubMenuSelection);
UI_PrintString(String, menu_item_x1, menu_item_x2, 0, 8);
if (valid && !gAskForConfirmation)
{ // show the frequency so that the user knows the channels frequency
const uint32_t frequency = SETTINGS_FetchChannelFrequency(gSubMenuSelection);
sprintf(String, "%u.%05u", frequency / 100000, frequency % 100000);
UI_PrintString(String, menu_item_x1, menu_item_x2, 4, 8);
}
SETTINGS_FetchChannelName(String, gSubMenuSelection);
UI_PrintString(String[0] ? String : "--", menu_item_x1, menu_item_x2, 2, 8);
already_printed = true;
break;
}
}
case MENU_MEM_NAME:
@@ -935,15 +942,12 @@ void UI_DisplayMenu(void)
sprintf(String, gSubMenuSelection == 0 ? gSubMenu_OFF_ON[0] : "%u*100ms", gSubMenuSelection);
break;
case MENU_LIST_CH:
case MENU_S_LIST:
if (gSubMenuSelection == 0)
strcpy(String, "LIST [0]\nNO LIST");
else if (gSubMenuSelection < 4)
sprintf(String, "LIST [%u]", gSubMenuSelection);
else if (gSubMenuSelection == 4)
strcpy(String, "LISTS\n[1, 2, 3]");
else if (gSubMenuSelection == 5)
if (gSubMenuSelection == MR_CHANNELS_LIST + 1)
strcpy(String, "ALL");
else
sprintf(String, "%u", gSubMenuSelection);
break;
#ifdef ENABLE_ALARM
@@ -1260,55 +1264,9 @@ void UI_DisplayMenu(void)
}
}
if (UI_MENU_GetCurrentMenuId() == MENU_SLIST1 || UI_MENU_GetCurrentMenuId() == MENU_SLIST2 || UI_MENU_GetCurrentMenuId() == MENU_SLIST3)
if (UI_MENU_GetCurrentMenuId() == MENU_S_PRI_CH_1 || UI_MENU_GetCurrentMenuId() == MENU_S_PRI_CH_2)
{
i = UI_MENU_GetCurrentMenuId() - MENU_SLIST1;
char *pPrintStr = String;
if (gSubMenuSelection < 0) {
pPrintStr = "NULL";
} else {
UI_GenerateChannelStringEx(String, true, gSubMenuSelection);
pPrintStr = String;
}
// channel number
UI_PrintString(pPrintStr, menu_item_x1, menu_item_x2, 0, 8);
SETTINGS_FetchChannelName(String, gSubMenuSelection);
pPrintStr = String[0] ? String : "--";
// channel name and scan-list
if (gSubMenuSelection < 0 || !gEeprom.SCAN_LIST_ENABLED[i]) {
UI_PrintString(pPrintStr, menu_item_x1, menu_item_x2, 2, 8);
} else {
/*
UI_PrintStringSmallNormal(pPrintStr, menu_item_x1, menu_item_x2, 2);
if (IS_MR_CHANNEL(gEeprom.SCANLIST_PRIORITY_CH1[i])) {
sprintf(String, "PRI%d:%u", 1, gEeprom.SCANLIST_PRIORITY_CH1[i] + 1);
UI_PrintString(String, menu_item_x1, menu_item_x2, 3, 8);
}
if (IS_MR_CHANNEL(gEeprom.SCANLIST_PRIORITY_CH2[i])) {
sprintf(String, "PRI%d:%u", 2, gEeprom.SCANLIST_PRIORITY_CH2[i] + 1);
UI_PrintString(String, menu_item_x1, menu_item_x2, 5, 8);
}
*/
UI_PrintStringSmallNormal(pPrintStr, menu_item_x1, menu_item_x2, 2);
for (uint8_t pri = 1; pri <= 2; pri++) {
uint8_t channel = (pri == 1) ? gEeprom.SCANLIST_PRIORITY_CH1[i] : gEeprom.SCANLIST_PRIORITY_CH2[i];
if (IS_MR_CHANNEL(channel)) {
sprintf(String, "PRI%d:%u", pri, channel + 1);
UI_PrintString(String, menu_item_x1, menu_item_x2, pri * 2 + 1, 8);
}
}
}
}
if ((UI_MENU_GetCurrentMenuId() == MENU_R_CTCS || UI_MENU_GetCurrentMenuId() == MENU_R_DCS) && gCssBackgroundScan)