diff --git a/app/app.c b/app/app.c index 66e41e4..f0fbbae 100644 --- a/app/app.c +++ b/app/app.c @@ -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 diff --git a/bitmaps.c b/bitmaps.c index b918ac4..a055072 100644 --- a/bitmaps.c +++ b/bitmaps.c @@ -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 +}; diff --git a/bitmaps.h b/bitmaps.h index 12205af..9364a43 100644 --- a/bitmaps.h +++ b/bitmaps.h @@ -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 diff --git a/firmware b/firmware index 6d982f4..2ed3312 100644 Binary files a/firmware and b/firmware differ diff --git a/firmware.bin b/firmware.bin index 7274ca4..98f615d 100644 Binary files a/firmware.bin and b/firmware.bin differ diff --git a/firmware.packed.bin b/firmware.packed.bin index 16c2853..04254d2 100644 Binary files a/firmware.packed.bin and b/firmware.packed.bin differ diff --git a/ui/main.c b/ui/main.c index f0a4533..497e659 100644 --- a/ui/main.c +++ b/ui/main.c @@ -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 }