diff --git a/Makefile b/Makefile index 0c4fc96..53403b8 100644 --- a/Makefile +++ b/Makefile @@ -30,6 +30,7 @@ ENABLE_SHOW_CHARGE_LEVEL := 0 ENABLE_REVERSE_BAT_SYMBOL := 1 ENABLE_CODE_SCAN_TIMEOUT := 0 ENABLE_FREQ_CODE_SCAN_TIMEOUT := 1 +ENABLE_FREQ_CODE_ROUNDING := 0 ENABLE_AM_FIX := 1 ENABLE_AM_FIX_SHOW_DATA := 1 ENABLE_SQUELCH_MORE_SENSITIVE := 1 @@ -307,6 +308,9 @@ endif ifeq ($(ENABLE_FREQ_CODE_SCAN_TIMEOUT),1) CFLAGS += -DENABLE_FREQ_CODE_SCAN_TIMEOUT endif +ifeq ($(ENABLE_FREQ_CODE_ROUNDING),1) + CFLAGS += -DENABLE_FREQ_CODE_ROUNDING +endif ifeq ($(ENABLE_AM_FIX),1) CFLAGS += -DENABLE_AM_FIX endif diff --git a/README.md b/README.md index b411c3e..e228ffd 100644 --- a/README.md +++ b/README.md @@ -57,6 +57,7 @@ ENABLE_SHOW_CHARGE_LEVEL := 0 show the charge level when the radio is ENABLE_REVERSE_BAT_SYMBOL := 1 mirror the battery symbol on the status bar (+ pole on the right) ENABLE_CODE_SCAN_TIMEOUT := 0 timeout if CTCSS/CDCSS is not found ENABLE_FREQ_CODE_SCAN_TIMEOUT := 1 timeout if CTCSS/CDCSS is not found after a successful frequency scan +ENABLE_FREQ_CODE_ROUNDING := 0 rounds the detected RF frequency to the nearest step size in use - F+4 scan mode 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 diff --git a/app/app.c b/app/app.c index 5bb42f4..2233463 100644 --- a/app/app.c +++ b/app/app.c @@ -1673,13 +1673,13 @@ void APP_TimeSlice10ms(void) BK4819_DisableFrequencyScan(); - #if 0 - g_scan_frequency = Result; - #else + #ifdef ENABLE_FREQ_CODE_ROUNDING { // round to nearest step multiple const uint32_t step = STEP_FREQ_TABLE[g_step_setting]; g_scan_frequency = ((Result + (step / 2)) / step) * step; } + #else + g_scan_frequency = Result; #endif if (g_scan_hit_count < 3) diff --git a/firmware.bin b/firmware.bin index 9a6cc18..8f7ca7f 100644 Binary files a/firmware.bin and b/firmware.bin differ diff --git a/firmware.packed.bin b/firmware.packed.bin index 5f76984..193bbed 100644 Binary files a/firmware.packed.bin and b/firmware.packed.bin differ diff --git a/ui/menu.c b/ui/menu.c index a733db1..2b8c56f 100644 --- a/ui/menu.c +++ b/ui/menu.c @@ -674,7 +674,10 @@ void UI_DisplayMenu(void) #endif case MENU_AUTOLK: - strcpy(String, (g_sub_menu_selection == 0) ? "OFF" : "AUTO"); + if (g_sub_menu_selection == 0) + strcpy(String, "OFF"); + else + sprintf(String, "%u secs", key_lock_timeout_500ms / 2); break; case MENU_COMPAND: