0
mirror of https://github.com/OneOfEleven/uv-k5-firmware-custom.git synced 2025-04-28 06:11:24 +03:00

Increase PGA gain above 226.4MHz + new scanlist symbols

This commit is contained in:
OneOfEleven 2023-09-18 18:26:10 +01:00
parent 06722a23d5
commit 1655bd8e23
7 changed files with 45 additions and 17 deletions

View File

@ -459,6 +459,8 @@ void APP_StartListening(FUNCTION_Type_t Function)
gUpdateStatus = true;
}
const uint32_t rx_frequency = gRxVfo->pRX->Frequency;
if (gRxVfo->IsAM)
{ // AM
@ -539,12 +541,18 @@ void APP_StartListening(FUNCTION_Type_t Function)
// MIXER ...... 0dB
// PGA ........ -15dB
// LNA SHORT LNA MIXER PGA
BK4819_WriteRegister(BK4819_REG_13, (3u << 8) | (2u << 5) | (3u << 3) | (3u << 0));
uint8_t pga = 6u;
if (rx_frequency < 22640000) // seem to need more gain above this frequency
pga = 3u;
else
pga = 6u;
BK4819_WriteRegister(BK4819_REG_13, (3u << 8) | (2u << 5) | (3u << 3) | (pga << 0));
//BK4819_WriteRegister(BK4819_REG_12, 0x037B); // 000000 11 011 11 011
//BK4819_WriteRegister(BK4819_REG_11, 0x027B); // 000000 10 011 11 011
//BK4819_WriteRegister(BK4819_REG_10, 0x007A); // 000000 00 011 11 010
//BK4819_WriteRegister(BK4819_REG_14, 0x0019); // 000000 00 000 11 001
gNeverUsed = 0;
}
else

View File

@ -430,7 +430,7 @@ const uint8_t BITMAP_VFO_NotDefault[8] =
0b00010100,
0b00001000
};
/*
const uint8_t BITMAP_ScanList[6] =
{ // diamond symbol
0b00001000,
@ -440,3 +440,23 @@ const uint8_t BITMAP_ScanList[6] =
0b00011100,
0b00001000
};
*/
const uint8_t BITMAP_ScanList1[6] =
{ // 1 symbol
0b00000000,
0b01000001,
0b01111111,
0b01000001,
0b00000000,
0b00000000
};
const uint8_t BITMAP_ScanList2[6] =
{ // 2 symbol
0b01000001,
0b01111111,
0b01000001,
0b01111111,
0b01000001,
0b00000000
};

View File

@ -56,7 +56,9 @@ extern const uint8_t BITMAP_CurrentIndicator[8];
extern const uint8_t BITMAP_VFO_Default[8];
extern const uint8_t BITMAP_VFO_NotDefault[8];
extern const uint8_t BITMAP_ScanList[6];
//extern const uint8_t BITMAP_ScanList[6];
extern const uint8_t BITMAP_ScanList1[6];
extern const uint8_t BITMAP_ScanList2[6];
#endif

BIN
firmware

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -55,9 +55,7 @@ void UI_DisplayMain(void)
const bool single_vfo = false;
// #endif
#ifdef ENABLE_DTMF_DECODER
bool center_line_is_free = true;
#endif
bool center_line_is_free = true;
for (vfo_num = 0; vfo_num < 2; vfo_num++)
{
@ -245,12 +243,12 @@ void UI_DisplayMain(void)
}
else
{
uint32_t frequency_Hz = gEeprom.VfoInfo[vfo_num].pRX->Frequency;
uint32_t frequency = gEeprom.VfoInfo[vfo_num].pRX->Frequency;
if (gCurrentFunction == FUNCTION_TRANSMIT)
{ // transmitting
Channel = (gEeprom.CROSS_BAND_RX_TX == CROSS_BAND_OFF) ? gEeprom.RX_CHANNEL : gEeprom.TX_CHANNEL;
if (Channel == vfo_num)
frequency_Hz = gEeprom.VfoInfo[vfo_num].pTX->Frequency;
frequency = gEeprom.VfoInfo[vfo_num].pTX->Frequency;
}
if (IS_MR_CHANNEL(gEeprom.ScreenChannel[vfo_num]))
@ -259,23 +257,23 @@ void UI_DisplayMain(void)
{ // show the scanlist symbols
const uint8_t Attributes = gMR_ChannelAttributes[gEeprom.ScreenChannel[vfo_num]];
if (Attributes & MR_CH_SCANLIST1)
memmove(pLine0 + 113, BITMAP_ScanList, sizeof(BITMAP_ScanList));
memmove(pLine0 + 113, BITMAP_ScanList1, sizeof(BITMAP_ScanList1));
if (Attributes & MR_CH_SCANLIST2)
memmove(pLine0 + 120, BITMAP_ScanList, sizeof(BITMAP_ScanList));
memmove(pLine0 + 120, BITMAP_ScanList2, sizeof(BITMAP_ScanList2));
}
switch (gEeprom.CHANNEL_DISPLAY_MODE)
{
case MDF_FREQUENCY: // show the channel frequency
#ifdef ENABLE_BIG_FREQ
NUMBER_ToDigits(frequency_Hz, String);
NUMBER_ToDigits(frequency, String);
// show the main large frequency digits
UI_DisplayFrequency(String, 31, Line, false, false);
// show the remaining 2 small frequency digits
UI_DisplaySmallDigits(2, String + 6, 112, Line + 1, true);
#else
// show the frequency in the main font
sprintf(String, "%03u.%05u", frequency_Hz / 100000, frequency_Hz % 100000);
sprintf(String, "%03u.%05u", frequency / 100000, frequency % 100000);
UI_PrintString(String, 31, 112, Line, 8);
#endif
break;
@ -283,7 +281,7 @@ void UI_DisplayMain(void)
case MDF_CHANNEL: // show the channel number
sprintf(String, "CH-%03u", gEeprom.ScreenChannel[vfo_num] + 1);
UI_PrintString(String, 31, 112, Line, 8);
frequency_Hz = 0;
frequency = 0;
break;
case MDF_NAME: // show the channel name
@ -315,7 +313,7 @@ void UI_DisplayMain(void)
UI_PrintStringSmall(String, 31 + 8, 0, Line);
// show the channel frequency below the channel number/name
sprintf(String, "%03u.%05u", frequency_Hz / 100000, frequency_Hz % 100000);
sprintf(String, "%03u.%05u", frequency / 100000, frequency % 100000);
UI_PrintStringSmall(String, 31 + 8, 0, Line + 1);
break;
@ -325,14 +323,14 @@ void UI_DisplayMain(void)
else
{ // frequency mode
#ifdef ENABLE_BIG_FREQ
NUMBER_ToDigits(frequency_Hz, String); // 8 digits
NUMBER_ToDigits(frequency, String); // 8 digits
// show the main large frequency digits
UI_DisplayFrequency(String, 31, Line, false, false);
// show the remaining 2 small frequency digits
UI_DisplaySmallDigits(2, String + 6, 112, Line + 1, true);
#else
// show the frequency in the main font
sprintf(String, "%03u.%05u", frequency_Hz / 100000, frequency_Hz % 100000);
sprintf(String, "%03u.%05u", frequency / 100000, frequency % 100000);
UI_PrintString(String, 38, 112, Line, 8);
#endif
}