mirror of
https://github.com/OneOfEleven/uv-k5-firmware-custom.git
synced 2025-04-28 14:21:25 +03:00
squelch update
This commit is contained in:
parent
8ee1e5f2b7
commit
1a5c5f8f87
4
Makefile
4
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
|
||||
|
BIN
firmware.bin
BIN
firmware.bin
Binary file not shown.
Binary file not shown.
51
radio.c
51
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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user