Add third list

This commit is contained in:
Armel FAUVEAU
2024-06-24 00:24:47 +02:00
parent 0235d26326
commit 2deff09d47
15 changed files with 179 additions and 21 deletions

View File

@@ -892,12 +892,44 @@ void UI_DisplayMain(void)
if (IS_MR_CHANNEL(gEeprom.ScreenChannel[vfo_num]))
{ // it's a channel
uint8_t countList = 0;
uint8_t shiftList = 0;
// show the scan list assigment symbols
const ChannelAttributes_t att = gMR_ChannelAttributes[gEeprom.ScreenChannel[vfo_num]];
if (att.scanlist1)
memcpy(p_line0 + 113, BITMAP_ScanList1, sizeof(BITMAP_ScanList1));
countList++;
if (att.scanlist2)
memcpy(p_line0 + 120, BITMAP_ScanList2, sizeof(BITMAP_ScanList2));
countList++;
if (att.scanlist3)
countList++;
shiftList = countList;
if (att.scanlist1)
{
memcpy(p_line0 + 128 - (shiftList * 7), BITMAP_ScanList1, sizeof(BITMAP_ScanList1));
shiftList--;
}
if (att.scanlist2)
{
memcpy(p_line0 + 128 - (shiftList * 7), BITMAP_ScanList2, sizeof(BITMAP_ScanList2));
shiftList--;
}
if (att.scanlist3)
{
memcpy(p_line0 + 128 - (shiftList * 7), BITMAP_ScanList3, sizeof(BITMAP_ScanList3));
}
/*
if (att.scanlist1)
memcpy(p_line0 + 107, BITMAP_ScanList1, sizeof(BITMAP_ScanList1));
if (att.scanlist2)
memcpy(p_line0 + 114, BITMAP_ScanList2, sizeof(BITMAP_ScanList2));
if (att.scanlist3)
memcpy(p_line0 + 121, BITMAP_ScanList3, sizeof(BITMAP_ScanList3));
*/
// compander symbol
#ifndef ENABLE_BIG_FREQ
@@ -941,6 +973,14 @@ void UI_DisplayMain(void)
{ // no channel name, show the channel number instead
sprintf(String, "CH-%03u", gEeprom.ScreenChannel[vfo_num] + 1);
}
else
{
// Too many list, so remove last character name
if(String[9] != 0 && countList == 3)
{
String[9] = 0;
}
}
if (gEeprom.CHANNEL_DISPLAY_MODE == MDF_NAME) {
UI_PrintString(String, 32, 0, line, 8);

View File

@@ -57,6 +57,7 @@ const t_menu_item MenuList[] =
{"Mode", MENU_AM }, // was "AM"
{"ScAdd1", MENU_S_ADD1 },
{"ScAdd2", MENU_S_ADD2 },
{"ScAdd3", MENU_S_ADD3 },
{"ChSave", MENU_MEM_CH }, // was "MEM-CH"
{"ChDele", MENU_DEL_CH }, // was "DEL-CH"
{"ChName", MENU_MEM_NAME },
@@ -64,6 +65,7 @@ const t_menu_item MenuList[] =
{"SList", MENU_S_LIST },
{"SList1", MENU_SLIST1 },
{"SList2", MENU_SLIST2 },
{"SList3", MENU_SLIST3 },
{"ScnRev", MENU_SC_REV },
#ifdef ENABLE_NOAA
{"NOAA-S", MENU_NOAA_S },
@@ -695,6 +697,7 @@ void UI_DisplayMenu(void)
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
@@ -805,7 +808,7 @@ void UI_DisplayMenu(void)
break;
case MENU_S_LIST:
if (gSubMenuSelection < 2)
if (gSubMenuSelection < 3)
sprintf(String, "LIST%u", 1 + gSubMenuSelection);
else
strcpy(String, "ALL");
@@ -1021,7 +1024,7 @@ void UI_DisplayMenu(void)
}
}
if (UI_MENU_GetCurrentMenuId() == MENU_SLIST1 || UI_MENU_GetCurrentMenuId() == MENU_SLIST2)
if (UI_MENU_GetCurrentMenuId() == MENU_SLIST1 || UI_MENU_GetCurrentMenuId() == MENU_SLIST2 || UI_MENU_GetCurrentMenuId() == MENU_SLIST3)
{
i = (UI_MENU_GetCurrentMenuId() == MENU_SLIST1) ? 0 : 1;
char *pPrintStr = String;

View File

@@ -66,6 +66,7 @@ enum
MENU_AUTOLK,
MENU_S_ADD1,
MENU_S_ADD2,
MENU_S_ADD3,
MENU_STE,
MENU_RP_STE,
MENU_MIC,
@@ -77,6 +78,7 @@ enum
MENU_S_LIST,
MENU_SLIST1,
MENU_SLIST2,
MENU_SLIST3,
#ifdef ENABLE_ALARM
MENU_AL_MOD,
#endif

View File

@@ -102,6 +102,9 @@ void UI_DisplayStatus()
memcpy(line + x + 2, BITMAP_ScanList2, sizeof(BITMAP_ScanList2));
break;
case 2:
memcpy(line + x + 2, BITMAP_ScanList3, sizeof(BITMAP_ScanList3));
break;
case 3:
memcpy(line + x, gFontScanAll, sizeof(gFontScanAll));
break;
}