diff --git a/Makefile b/Makefile index 317ac10..f78b2a0 100644 --- a/Makefile +++ b/Makefile @@ -77,7 +77,7 @@ ENABLE_BOOT_BEEPS := 0 ENABLE_FLASH_LIGHT_SOS_TONE := 0 ENABLE_SHOW_CHARGE_LEVEL := 0 ENABLE_REVERSE_BAT_SYMBOL := 0 -ENABLE_FREQ_SEARCH_LNA := 1 +ENABLE_FREQ_SEARCH_LNA := 0 ENABLE_FREQ_SEARCH_TIMEOUT := 0 ENABLE_CODE_SEARCH_TIMEOUT := 0 # scan ignore list 740 B @@ -87,7 +87,7 @@ ENABLE_SCAN_RANGES := 1 # AM Fix 800 B ENABLE_AM_FIX := 1 ENABLE_AM_FIX_SHOW_DATA := 0 -ENABLE_SQUELCH_MORE_SENSITIVE := 1 +ENABLE_SQUELCH_MORE_SENSITIVE := 0 ENABLE_SQ_OPEN_WITH_UP_DN_BUTTS := 1 ENABLE_FASTER_CHANNEL_SCAN := 1 ENABLE_COPY_CHAN_TO_VFO_TO_CHAN := 1 diff --git a/firmware.bin b/firmware.bin index 4f691ef..c5bc06c 100644 Binary files a/firmware.bin and b/firmware.bin differ diff --git a/firmware.packed.bin b/firmware.packed.bin index 12d3964..3a54cc6 100644 Binary files a/firmware.packed.bin and b/firmware.packed.bin differ diff --git a/radio.c b/radio.c index a5a53fc..8d3b58f 100644 --- a/radio.c +++ b/radio.c @@ -515,36 +515,41 @@ void RADIO_ConfigureSquelch(vfo_info_t *p_vfo) glitch_open = (glitch_open * 2) / 1; #endif + // ********* + // ensure the 'close' threshold is lower than the 'open' threshold + // ie, maintain a minimum level of hysteresis + + rssi_close = (rssi_open * 4) / 6; + noise_close = (noise_open * 6) / 4; + glitch_close = (glitch_open * 6) / 4; + + if (rssi_open < 8) + rssi_open = 8; + if (rssi_close > (rssi_open - 8)) + rssi_close = rssi_open - 8; + + if (noise_open > (127 - 4)) + noise_open = 127 - 4; + if (noise_close < (noise_open + 4)) + noise_close = noise_open + 4; + + if (glitch_open > (255 - 8)) + glitch_open = 255 - 8; + if (glitch_close < (glitch_open + 8)) + glitch_close = glitch_open + 8; + #else // more sensitive .. use when RX bandwidths are fixed (no weak signal auto adjust) + rssi_open = (rssi_open * 3) / 4; noise_open = (noise_open * 4) / 3; glitch_open = (glitch_open * 4) / 3; + + rssi_close = (rssi_close * 3) / 4; + noise_close = (noise_close * 4) / 3; + glitch_close = (glitch_close * 4) / 3; #endif - // ********* - // ensure the 'close' threshold is lower than the 'open' threshold - // ie, maintain a minimum level of hysteresis - - rssi_close = (rssi_open * 4) / 6; - noise_close = (noise_open * 6) / 4; - glitch_close = (glitch_open * 6) / 4; - - if (rssi_open < 8) - rssi_open = 8; - if (rssi_close > (rssi_open - 8)) - rssi_close = rssi_open - 8; - - if (noise_open > (127 - 4)) - noise_open = 127 - 4; - if (noise_close < (noise_open + 4)) - noise_close = noise_open + 4; - - if (glitch_open > (255 - 8)) - glitch_open = 255 - 8; - if (glitch_close < (glitch_open + 8)) - glitch_close = glitch_open + 8; - // ********* p_vfo->squelch_open_rssi_thresh = (rssi_open > 255) ? 255 : (rssi_open < 0) ? 0 : rssi_open;