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);