mirror of
https://github.com/OneOfEleven/uv-k5-firmware-custom.git
synced 2025-04-27 22:01:26 +03:00
fix 1sec audio tick when RX monitor enable and RX CTCSS set
This commit is contained in:
parent
0dd0e79298
commit
c9ee299b8f
2
Makefile
2
Makefile
@ -58,7 +58,7 @@ ENABLE_SHOW_FREQ_IN_CHAN := 1
|
||||
# small bold 580 B
|
||||
ENABLE_SMALL_BOLD := 1
|
||||
# smallest font 2 kB
|
||||
ENABLE_SMALLEST_FONT := 0
|
||||
#ENABLE_SMALLEST_FONT := 0
|
||||
# trim trailing 44 B
|
||||
ENABLE_TRIM_TRAILING_ZEROS := 0
|
||||
ENABLE_WIDE_RX := 1
|
||||
|
@ -194,6 +194,8 @@ static void APP_process_new_receive(void)
|
||||
|
||||
if (!g_squelch_open)
|
||||
BK4819_set_AFC(0);
|
||||
else
|
||||
BK4819_set_GPIO_pin(BK4819_GPIO6_PIN2_GREEN, true); // green LED on
|
||||
|
||||
if (!g_squelch_open && !g_monitor_enabled)
|
||||
{ // squelch is closed
|
||||
@ -335,8 +337,12 @@ static void APP_process_rx(void)
|
||||
goto Skip;
|
||||
}
|
||||
|
||||
if (g_found_ctcss_tick_10ms == 0)
|
||||
if (g_found_ctcss_tick_10ms == 0 && !g_monitor_enabled)
|
||||
{
|
||||
#if defined(ENABLE_UART) && defined(ENABLE_UART_DEBUG)
|
||||
// UART_printf("rx code check\n");
|
||||
#endif
|
||||
|
||||
if (g_current_code_type == CODE_TYPE_CONTINUOUS_TONE && g_found_ctcss)
|
||||
{
|
||||
g_found_ctcss = false;
|
||||
|
@ -1352,9 +1352,8 @@ void BK4819_config_sub_audible(void)
|
||||
// #ifdef ENABLE_CTCSS_TAIL_PHASE_SHIFT
|
||||
// BK4819_gen_tail(2); // 180 deg
|
||||
// #else
|
||||
// BK4819_gen_tail(4);
|
||||
BK4819_write_reg(0x52, (0u << 15) | (0u << 13) | (0u << 12) | (10u << 6) | (15u << 0)); // 0x028F); // 0 00 0 001010 001111
|
||||
// #endif
|
||||
BK4819_gen_tail(5);
|
||||
// #endif
|
||||
}
|
||||
|
||||
// freq_10Hz is CTCSS Hz * 10
|
||||
@ -1402,7 +1401,7 @@ void BK4819_gen_tail(const unsigned int tail)
|
||||
// 2 = CTCSS0 180° phase shift
|
||||
// 3 = CTCSS0 240° phase shift
|
||||
//
|
||||
// <12> CTCSS Detection Threshold Mode
|
||||
// <12> 0 CTCSS Detection Threshold Mode
|
||||
// 1 = ~0.1%
|
||||
// 0 = 0.1Hz
|
||||
//
|
||||
@ -1413,14 +1412,14 @@ void BK4819_gen_tail(const unsigned int tail)
|
||||
uint16_t tail_phase_shift = 1;
|
||||
uint16_t ctcss_tail_mode_selection = 0;
|
||||
uint16_t ctcss_detect_threshold_mode = 0;
|
||||
#if 0
|
||||
#if 1
|
||||
// original QS setting
|
||||
uint16_t ctcss_found_threshold = 10;
|
||||
uint16_t ctcss_lost_threshold = 15;
|
||||
uint16_t ctcss_found_threshold = 10;
|
||||
uint16_t ctcss_lost_threshold = 15;
|
||||
#else
|
||||
// increase it to help reduce false detections when doing CTCSS/CDCSS searching
|
||||
uint16_t ctcss_found_threshold = 15;
|
||||
uint16_t ctcss_lost_threshold = 23;
|
||||
uint16_t ctcss_found_threshold = 13;
|
||||
uint16_t ctcss_lost_threshold = 18;
|
||||
#endif
|
||||
|
||||
switch (tail)
|
||||
@ -1443,6 +1442,9 @@ void BK4819_gen_tail(const unsigned int tail)
|
||||
ctcss_found_threshold = 17;
|
||||
ctcss_lost_threshold = 47;
|
||||
break;
|
||||
case 5:
|
||||
tail_phase_shift = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
BK4819_write_reg(0x52,
|
||||
|
BIN
firmware.bin
BIN
firmware.bin
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user