0
mirror of https://github.com/OneOfEleven/uv-k5-firmware-custom.git synced 2025-06-20 15:08:37 +03:00

fix tx offset entry in menu "Tx OFS"

This commit is contained in:
OneOfEleven
2023-10-26 13:46:12 +01:00
parent 4397931cfb
commit 39fdb7ed33
13 changed files with 652 additions and 476 deletions

View File

@ -69,10 +69,10 @@
// original QS front end register settings
// 0x03BE 00000 011 101 11 110
const uint8_t orig_lna_short = 3; // 0dB
const uint8_t orig_lna = 5; // -4dB
const uint8_t orig_mixer = 3; // 0dB
const uint8_t orig_pga = 6; // -3dB
const uint8_t orig_lnas = 3; // 0dB
const uint8_t orig_lna = 5; // -4dB
const uint8_t orig_mixer = 3; // 0dB
const uint8_t orig_pga = 6; // -3dB
static void APP_process_key(const key_code_t Key, const bool key_pressed, const bool key_held);
@ -558,12 +558,6 @@ bool APP_start_listening(function_type_t Function, const bool reset_am_fix)
#ifdef ENABLE_AM_FIX
{ // RF RX front end gain
// original setting
uint16_t lna_short = orig_lna_short;
uint16_t lna = orig_lna;
uint16_t mixer = orig_mixer;
uint16_t pga = orig_pga;
if (g_rx_vfo->am_mode && g_setting_am_fix)
{ // AM RX mode
if (reset_am_fix)
@ -571,8 +565,8 @@ bool APP_start_listening(function_type_t Function, const bool reset_am_fix)
AM_fix_10ms(chan);
}
else
{
BK4819_WriteRegister(0x13, (lna_short << 8) | (lna << 5) | (mixer << 3) | (pga << 0));
{ // original setting
BK4819_WriteRegister(0x13, (orig_lnas << 8) | (orig_lna << 5) | (orig_mixer << 3) | (orig_pga << 0));
}
}
#else