diff --git a/Makefile b/Makefile index e1fec48..22d76f0 100644 --- a/Makefile +++ b/Makefile @@ -25,7 +25,7 @@ ENABLE_REVERSE_BAT_SYMBOL := 1 ENABLE_NO_SCAN_TIMEOUT := 1 ENABLE_AM_FIX := 1 ENABLE_AM_FIX_SHOW_DATA := 1 -ENABLE_SQUELCH1_LOWER := 1 +ENABLE_SQUELCH_LOWER := 1 ENABLE_RSSI_BAR := 1 ENABLE_AUDIO_BAR := 1 #ENABLE_COPY_CHAN_TO_VFO := 1 @@ -225,8 +225,8 @@ endif ifeq ($(ENABLE_AM_FIX_TEST1),1) CFLAGS += -DENABLE_AM_FIX_TEST1 endif -ifeq ($(ENABLE_SQUELCH1_LOWER),1) - CFLAGS += -DENABLE_SQUELCH1_LOWER +ifeq ($(ENABLE_SQUELCH_LOWER),1) + CFLAGS += -DENABLE_SQUELCH_LOWER endif ifeq ($(ENABLE_RSSI_BAR),1) CFLAGS += -DENABLE_RSSI_BAR diff --git a/README.md b/README.md index f6b230d..1203f3e 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ ENABLE_REVERSE_BAT_SYMBOL := 1 mirror the battery symbol on the status ENABLE_NO_SCAN_TIMEOUT := 1 remove the 32 sec timeout from the CTCSS/DCS scan (press exit butt to end scan) ENABLE_AM_FIX := 1 dynamically adjust the front end gains when in AM mode to helo prevent AM demodulator saturation - ignore the on-screen RSSI (for now) ENABLE_AM_FIX_SHOW_DATA := 1 show debug data for the AM fix -ENABLE_SQUELCH1_LOWER := 0 adjusts squelch setting '1' to be more sensitive - I plan to let user adjust it in the menu +ENABLE_SQUELCH_LOWER := 1 squelch settings more sensitive - plan to let user adjust it in the menu ENABLE_RSSI_BAR := 1 enable a dBm/Sx RSSI bar graph level ENABLE_AUDIO_BAR := 0 experimental, display an audo bar level when TX'ing #ENABLE_COPY_CHAN_TO_VFO := 1 not yet implemented - copy the channel into the VFO diff --git a/firmware.bin b/firmware.bin index 589e321..4b7fd77 100644 Binary files a/firmware.bin and b/firmware.bin differ diff --git a/firmware.packed.bin b/firmware.packed.bin index 820e8be..f266d85 100644 Binary files a/firmware.packed.bin and b/firmware.packed.bin differ diff --git a/radio.c b/radio.c index 3ce7b72..b245505 100644 --- a/radio.c +++ b/radio.c @@ -436,7 +436,7 @@ void RADIO_ConfigureSquelchAndOutputPower(VFO_Info_t *pInfo) uint16_t Base = (Band < BAND4_174MHz) ? 0x1E60 : 0x1E00; if (gEeprom.SQUELCH_LEVEL == 0) - { + { // squelch == 0 (off) pInfo->SquelchOpenRSSIThresh = 0; pInfo->SquelchOpenNoiseThresh = 127; pInfo->SquelchCloseGlitchThresh = 255; @@ -446,9 +446,8 @@ void RADIO_ConfigureSquelchAndOutputPower(VFO_Info_t *pInfo) pInfo->SquelchOpenGlitchThresh = 255; } else - { - Base += gEeprom.SQUELCH_LEVEL; - // my squelch-1 + { // squelch >= 1 + Base += gEeprom.SQUELCH_LEVEL; // my squelch-1 // VHF UHF EEPROM_ReadBuffer(Base + 0x00, &pInfo->SquelchOpenRSSIThresh, 1); // 50 10 EEPROM_ReadBuffer(Base + 0x10, &pInfo->SquelchCloseRSSIThresh, 1); // 40 5 @@ -459,37 +458,21 @@ void RADIO_ConfigureSquelchAndOutputPower(VFO_Info_t *pInfo) EEPROM_ReadBuffer(Base + 0x40, &pInfo->SquelchCloseGlitchThresh, 1); // 90 90 EEPROM_ReadBuffer(Base + 0x50, &pInfo->SquelchOpenGlitchThresh, 1); // 100 100 - #if ENABLE_SQUELCH1_LOWER - // make squelch-1 more sensitive - if (gEeprom.SQUELCH_LEVEL == 1) - { - if (Band < BAND4_174MHz) - { - pInfo->SquelchOpenRSSIThresh = ((uint16_t)pInfo->SquelchOpenRSSIThresh * 11) / 12; - pInfo->SquelchCloseRSSIThresh = ((uint16_t)pInfo->SquelchOpenRSSIThresh * 9) / 10; + #if ENABLE_SQUELCH_LOWER + // make squelch more sensitive + pInfo->SquelchOpenRSSIThresh = ((uint16_t)pInfo->SquelchOpenRSSIThresh * 8) / 9; + pInfo->SquelchCloseRSSIThresh = ((uint16_t)pInfo->SquelchOpenRSSIThresh * 7) / 8; - pInfo->SquelchOpenNoiseThresh = ((uint16_t)pInfo->SquelchOpenNoiseThresh * 9) / 8; - pInfo->SquelchCloseNoiseThresh = ((uint16_t)pInfo->SquelchOpenNoiseThresh * 10) / 9; + pInfo->SquelchOpenNoiseThresh = ((uint16_t)pInfo->SquelchOpenNoiseThresh * 8) / 7; + pInfo->SquelchCloseNoiseThresh = ((uint16_t)pInfo->SquelchOpenNoiseThresh * 9) / 8; - pInfo->SquelchOpenGlitchThresh = ((uint16_t)pInfo->SquelchOpenGlitchThresh * 9) / 8; - pInfo->SquelchCloseGlitchThresh = ((uint16_t)pInfo->SquelchOpenGlitchThresh * 10) / 9; - } - else - { - pInfo->SquelchOpenRSSIThresh = ((uint16_t)pInfo->SquelchOpenRSSIThresh * 9) / 10; - pInfo->SquelchCloseRSSIThresh = ((uint16_t)pInfo->SquelchOpenRSSIThresh * 7) / 8; - - pInfo->SquelchOpenNoiseThresh = ((uint16_t)pInfo->SquelchOpenNoiseThresh * 8) / 7; - pInfo->SquelchCloseNoiseThresh = ((uint16_t)pInfo->SquelchOpenNoiseThresh * 10) / 9; - - pInfo->SquelchOpenGlitchThresh = ((uint16_t)pInfo->SquelchOpenGlitchThresh * 8) / 7; - pInfo->SquelchCloseGlitchThresh = ((uint16_t)pInfo->SquelchOpenGlitchThresh * 10) / 9; - } - } + pInfo->SquelchOpenGlitchThresh = ((uint16_t)pInfo->SquelchOpenGlitchThresh * 8) / 7; + pInfo->SquelchCloseGlitchThresh = ((uint16_t)pInfo->SquelchOpenGlitchThresh * 9) / 8; #endif if (pInfo->SquelchOpenNoiseThresh > 127) pInfo->SquelchOpenNoiseThresh = 127; + if (pInfo->SquelchCloseNoiseThresh > 127) pInfo->SquelchCloseNoiseThresh = 127; }