0
mirror of https://github.com/OneOfEleven/uv-k5-firmware-custom.git synced 2025-04-28 14:21:25 +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; gUpdateStatus = true;
} }
const uint32_t rx_frequency = gRxVfo->pRX->Frequency;
if (gRxVfo->IsAM) if (gRxVfo->IsAM)
{ // AM { // AM
@ -539,7 +541,13 @@ void APP_StartListening(FUNCTION_Type_t Function)
// MIXER ...... 0dB // MIXER ...... 0dB
// PGA ........ -15dB // PGA ........ -15dB
// LNA SHORT LNA MIXER PGA // 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_12, 0x037B); // 000000 11 011 11 011
//BK4819_WriteRegister(BK4819_REG_11, 0x027B); // 000000 10 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_10, 0x007A); // 000000 00 011 11 010

View File

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