diff --git a/Makefile b/Makefile index 386464b..2cacacd 100644 --- a/Makefile +++ b/Makefile @@ -28,7 +28,8 @@ ENABLE_REVERSE_BAT_SYMBOL := 1 ENABLE_CODE_SCAN_TIMEOUT := 0 ENABLE_AM_FIX := 1 ENABLE_AM_FIX_SHOW_DATA := 1 -ENABLE_SQUELCH_LOWER := 1 +ENABLE_SQUELCH_MORE_SENSITIVE := 1 +ENABLE_FASTER_CHANNEL_SCAN := 0 ENABLE_RSSI_BAR := 1 ENABLE_AUDIO_BAR := 1 #ENABLE_COPY_CHAN_TO_VFO := 1 @@ -248,8 +249,11 @@ endif ifeq ($(ENABLE_AM_FIX_TEST1),1) CFLAGS += -DENABLE_AM_FIX_TEST1 endif -ifeq ($(ENABLE_SQUELCH_LOWER),1) - CFLAGS += -DENABLE_SQUELCH_LOWER +ifeq ($(ENABLE_SQUELCH_MORE_SENSITIVE),1) + CFLAGS += -DENABLE_SQUELCH_MORE_SENSITIVE +endif +ifeq ($(ENABLE_FASTER_CHANNEL_SCAN),1) + CFLAGS += -DENABLE_FASTER_CHANNEL_SCAN endif ifeq ($(ENABLE_RSSI_BAR),1) CFLAGS += -DENABLE_RSSI_BAR diff --git a/README.md b/README.md index 9e68569..40be7d3 100644 --- a/README.md +++ b/README.md @@ -27,34 +27,35 @@ You'll find the options at the top of "Makefile" ('0' = disable, '1' = enable) . ``` ENABLE_SWD := 0 only needed if using CPU's SWD port (debugging/programming) -ENABLE_OVERLAY := 0 cpu FLASH stuff -ENABLE_LTO := 0 **experimental, reduces size of compiled firmware but might break EEPROM reads - DISABLE overlay if you enable this -ENABLE_UART := 1 without this you can't configure radio via PC -ENABLE_AIRCOPY := 0 easier to just enter frequency -ENABLE_FMRADIO := 1 WBFM VHF band 2 RX -ENABLE_NOAA := 0 everything NOAA +ENABLE_OVERLAY := 0 cpu FLASH stuff, not needed +ENABLE_LTO := 0 **experimental, reduces size of compiled firmware but might break EEPROM reads (overlay will be disabled if you enable this) +ENABLE_UART := 1 without this you can't configure radio via PC ! +ENABLE_AIRCOPY := 0 easier to just enter frequency with butts +ENABLE_FMRADIO := 1 WBFM VHF broadcast band receiver +ENABLE_NOAA := 0 everything NOAA (only of any use in the USA) ENABLE_VOICE := 0 want to hear voices ? ENABLE_ALARM := 0 TX alarms -ENABLE_1750HZ := 0 side key 1750Hz TX tone -ENABLE_BIG_FREQ := 0 big font frequencies +ENABLE_1750HZ := 0 side key 1750Hz TX tone (older style repeater access) +ENABLE_BIG_FREQ := 0 big font frequencies (like original QS firmware) ENABLE_SMALL_BOLD := 1 bold channel name/no. (when name + freq channel display mode) ENABLE_KEEP_MEM_NAME := 1 maintain channel name when (re)saving memory channel -ENABLE_WIDE_RX := 1 full 18MHz to 1300MHz RX (though frontend not tuned over full range) +ENABLE_WIDE_RX := 1 full 18MHz to 1300MHz RX (though front-end/PA not designed for full range) ENABLE_TX_WHEN_AM := 0 allow TX (always FM) when RX is set to AM ENABLE_F_CAL_MENU := 0 enable/disable the radios hidden frequency calibration menu ENABLE_CTCSS_TAIL_PHASE_SHIFT := 1 standard CTCSS tail phase shift rather than QS's own 55Hz tone method -ENABLE_MAIN_KEY_HOLD := 1 initial F-key press not needed, instead hold down keys 0-9 to access the functions -ENABLE_BOOT_BEEPS := 0 give user audio feedback on volume knob position at boot-up +ENABLE_MAIN_KEY_HOLD := 1 initial F-key press not needed, instead just hold down keys 0-9 to access the secondary butt functions +ENABLE_BOOT_BEEPS := 0 gives user audio feedback on volume knob position at boot-up ENABLE_COMPANDER := 1 compander option (per channel) ENABLE_SHOW_CHARGE_LEVEL := 0 show the charge level when the radio is on charge ENABLE_REVERSE_BAT_SYMBOL := 1 mirror the battery symbol on the status bar (+ pole on the right) -ENABLE_CODE_SCAN_TIMEOUT := 0 enable/disable 32-sec CTCSS/DCS scan timeout (press exit butt to end scan if disabled) -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_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_CODE_SCAN_TIMEOUT := 0 enable/disable 32-sec CTCSS/DCS scan timeout (press exit butt instead of time-out 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 level (for now) +ENABLE_AM_FIX_SHOW_DATA := 1 show debug data for the AM fix (still tweaking it) +ENABLE_SQUELCH_MORE_SENSITIVE := 1 make squelch levels a little bit more sensitive - I plan to let user adjust the values themselves +ENABLE_FASTER_CHANNEL_SCAN := 0 increases the channel scan speed, but the squelch is also made more twitchy +ENABLE_RSSI_BAR := 1 enable a dBm/Sn RSSI bar graph level inplace of the little antenna symbols 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 +#ENABLE_COPY_CHAN_TO_VFO := 1 not yet implemented - copy the current channel into the VFO #ENABLE_SINGLE_VFO_CHAN := 1 not yet implemented - single VFO on display when possible #ENABLE_BAND_SCOPE := 1 not yet implemented - spectrum/pan-adapter ``` diff --git a/am_fix.h b/am_fix.h index 62973f7..3c94d17 100644 --- a/am_fix.h +++ b/am_fix.h @@ -20,11 +20,6 @@ #include #include -extern const uint8_t orig_lna_short; -extern const uint8_t orig_lna; -extern const uint8_t orig_mixer; -extern const uint8_t orig_pga; - #ifdef ENABLE_AM_FIX extern int16_t rssi_gain_diff[2]; diff --git a/app/app.c b/app/app.c index 90f1355..9d9efea 100644 --- a/app/app.c +++ b/app/app.c @@ -688,7 +688,7 @@ static void MR_NextChannel(void) break; } - // this bit doesn't work at all :( + // this bit doesn't work at all - yet :( case SCAN_NEXT_CHAN_DUAL_WATCH: // if (gEeprom.DUAL_WATCH != DUAL_WATCH_OFF) { @@ -734,8 +734,11 @@ static void MR_NextChannel(void) gUpdateDisplay = true; } -// ScanPauseDelayIn_10ms = scan_pause_delay_in_3_10ms; - ScanPauseDelayIn_10ms = 8; // 80ms .. <= ~60ms it misses signals (squelch response and/or PLL lock time) ? + #ifdef ENABLE_FASTER_CHANNEL_SCAN + ScanPauseDelayIn_10ms = 8; // 80ms .. <= ~60ms it misses signals (squelch response and/or PLL lock time) ? + #else + ScanPauseDelayIn_10ms = scan_pause_delay_in_3_10ms; + #endif bScanKeepFrequency = false; diff --git a/driver/bk4819.c b/driver/bk4819.c index d28ad6b..6ffff61 100644 --- a/driver/bk4819.c +++ b/driver/bk4819.c @@ -716,14 +716,14 @@ void BK4819_SetupSquelch( // 0 ~ 255 // BK4819_WriteRegister(BK4819_REG_4E, // 01 101 11 1 00000000 - #if 0 + #ifndef ENABLE_FASTER_CHANNEL_SCAN // original (1u << 14) // 1 ??? | (5u << 11) // 5 squelch = 1 delay .. 0 ~ 7 | (3u << 9) // 3 squelch = 0 delay .. 0 ~ 3 | SquelchOpenGlitchThresh); // 0 ~ 255 #else - // supposedly fast + // faster (but twitchier) (1u << 14) // 1 ??? | SquelchOpenGlitchThresh); // 0 ~ 255 #endif diff --git a/firmware.bin b/firmware.bin index 087459c..24df564 100644 Binary files a/firmware.bin and b/firmware.bin differ diff --git a/firmware.packed.bin b/firmware.packed.bin index 5b72d44..ca6ff4e 100644 Binary files a/firmware.packed.bin and b/firmware.packed.bin differ diff --git a/radio.c b/radio.c index 46b9cfc..d96f760 100644 --- a/radio.c +++ b/radio.c @@ -343,7 +343,7 @@ void RADIO_ConfigureChannel(const unsigned int VFO, const unsigned int configure } // *************** - + struct { uint32_t Frequency; @@ -456,17 +456,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_SQUELCH_LOWER - // make squelch more sensitive + #if ENABLE_SQUELCH_MORE_SENSITIVE + // make squelch a little more sensitive + // + // getting the best setting here is still experimental, bare with me + // + // note that 'noise' and 'glitch' value are inverted compared to 'rssi' values - pInfo->SquelchOpenRSSIThresh = ((uint16_t)pInfo->SquelchOpenRSSIThresh * 8) / 9; - pInfo->SquelchCloseRSSIThresh = ((uint16_t)pInfo->SquelchOpenRSSIThresh * 7) / 8; + pInfo->SquelchOpenRSSIThresh = ((uint16_t)pInfo->SquelchOpenRSSIThresh * 10) / 11; + pInfo->SquelchCloseRSSIThresh = ((uint16_t)pInfo->SquelchOpenRSSIThresh * 10) / 11; - pInfo->SquelchOpenNoiseThresh = ((uint16_t)pInfo->SquelchOpenNoiseThresh * 8) / 7; - pInfo->SquelchCloseNoiseThresh = ((uint16_t)pInfo->SquelchOpenNoiseThresh * 9) / 8; + pInfo->SquelchOpenNoiseThresh = ((uint16_t)pInfo->SquelchOpenNoiseThresh * 11) / 10; + pInfo->SquelchCloseNoiseThresh = ((uint16_t)pInfo->SquelchOpenNoiseThresh * 11) / 10; - pInfo->SquelchOpenGlitchThresh = ((uint16_t)pInfo->SquelchOpenGlitchThresh * 8) / 7; - pInfo->SquelchCloseGlitchThresh = ((uint16_t)pInfo->SquelchOpenGlitchThresh * 9) / 8; + pInfo->SquelchOpenGlitchThresh = ((uint16_t)pInfo->SquelchOpenGlitchThresh * 11) / 10; + pInfo->SquelchCloseGlitchThresh = ((uint16_t)pInfo->SquelchOpenGlitchThresh * 11) / 10; #endif if (pInfo->SquelchOpenNoiseThresh > 127) @@ -968,7 +972,7 @@ void RADIO_PrepareTX(void) } // TX is allowed - + if (gDTMF_ReplyState == DTMF_REPLY_ANI) { if (gDTMF_CallMode == DTMF_CALL_MODE_DTMF)