diff --git a/Makefile b/Makefile index 3e56543..317ac10 100644 --- a/Makefile +++ b/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 diff --git a/app/app.c b/app/app.c index 38111cc..652333e 100644 --- a/app/app.c +++ b/app/app.c @@ -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; diff --git a/driver/bk4819.c b/driver/bk4819.c index a069def..eb7d289 100644 --- a/driver/bk4819.c +++ b/driver/bk4819.c @@ -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, diff --git a/firmware.bin b/firmware.bin index e1d0935..a9c5576 100644 Binary files a/firmware.bin and b/firmware.bin differ diff --git a/firmware.packed.bin b/firmware.packed.bin index b1dfb61..9e7cacf 100644 Binary files a/firmware.packed.bin and b/firmware.packed.bin differ