0
mirror of https://github.com/OneOfEleven/uv-k5-firmware-custom.git synced 2025-04-28 22:31:25 +03:00

Clean up DTMF decoder code (now menu item)

This commit is contained in:
OneOfEleven 2023-09-19 10:41:31 +01:00
parent 609e50f034
commit 797fc0729f
8 changed files with 14 additions and 24 deletions

View File

@ -19,8 +19,8 @@ ENABLE_MAIN_KEY_HOLD := 1
ENABLE_BOOT_BEEPS := 0 ENABLE_BOOT_BEEPS := 0
ENABLE_COMPANDER := 1 ENABLE_COMPANDER := 1
ENABLE_SHOW_CHARGE_LEVEL := 1 ENABLE_SHOW_CHARGE_LEVEL := 1
ENABLE_STATUSBAR_VOLTAGE := 1 ENABLE_STATUSBAR_VOLTAGE := 0
ENABLE_STATUSBAR_PERCENTAGE := 0 ENABLE_STATUSBAR_PERCENTAGE := 1
#ENABLE_SINGLE_VFO_CHAN := 1 #ENABLE_SINGLE_VFO_CHAN := 1
#ENABLE_BAND_SCOPE := 1 #ENABLE_BAND_SCOPE := 1

View File

@ -45,6 +45,7 @@ ENABLE_STATUSBAR_PERCENTAGE := 1 show the battery percentage on the top
* AM RX everywhere * AM RX everywhere
* Better backlight times (inc always on) * Better backlight times (inc always on)
* Nicer/cleaner big numeric font than original Quansheng big numeric font * Nicer/cleaner big numeric font than original Quansheng big numeric font
* Live DTMF decoder option, though the decoder needs some coeff tuning changes to decode other radios it seems
* Various menu re-wordings (trying to reduce 'WTH does that mean ?') * Various menu re-wordings (trying to reduce 'WTH does that mean ?')
* Extra menu items (including hidden ones) * Extra menu items (including hidden ones)
* plus others * plus others

View File

@ -2068,14 +2068,12 @@ static void APP_ProcessKey(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
if (gEeprom.AUTO_KEYPAD_LOCK) if (gEeprom.AUTO_KEYPAD_LOCK)
gKeyLockCountdown = 30; // 15 seconds gKeyLockCountdown = 30; // 15 seconds
#ifdef ENABLE_DTMF_DECODER if (Key == KEY_EXIT && bKeyPressed && bKeyHeld && gDTMF_ReceivedSaved[0] > 0)
if (Key == KEY_EXIT && bKeyPressed && bKeyHeld && gDTMF_ReceivedSaved[0] > 0) { // clear the live DTMF decoder if the EXIT key is held
{ // clear the live DTMF decoder if the EXIT key is held gDTMF_RecvTimeoutSaved = 0;
gDTMF_RecvTimeoutSaved = 0; gDTMF_ReceivedSaved[0] = '\0';
gDTMF_ReceivedSaved[0] = '\0'; gUpdateDisplay = true;
gUpdateDisplay = true; }
}
#endif
if (!bKeyPressed) if (!bKeyPressed)
{ {

BIN
firmware

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -706,7 +706,7 @@ void RADIO_SetupRegisters(bool bSwitchToFunction0)
BK4819_SetCompander(!gRxVfo->IsAM ? gRxVfo->Compander : 0); BK4819_SetCompander(!gRxVfo->IsAM ? gRxVfo->Compander : 0);
#endif #endif
#ifndef ENABLE_DTMF_DECODER #if 0
// there's no reason the DTMF decoder can't be used in AM RX mode too // there's no reason the DTMF decoder can't be used in AM RX mode too
// aircraft comms use it on HF (AM and SSB) // aircraft comms use it on HF (AM and SSB)
if (gRxVfo->IsAM || (!gRxVfo->DTMF_DECODING_ENABLE && !gSetting_KILLED)) if (gRxVfo->IsAM || (!gRxVfo->DTMF_DECODING_ENABLE && !gSetting_KILLED))

View File

@ -99,9 +99,7 @@ void UI_DisplayMain(void)
{ {
sprintf(String, ">%s", gDTMF_InputBox); sprintf(String, ">%s", gDTMF_InputBox);
#ifdef ENABLE_DTMF_DECODER center_line_is_free = false;
center_line_is_free = false;
#endif
} }
UI_PrintString(String, 2, 0, vfo_num * 3, 8); UI_PrintString(String, 2, 0, vfo_num * 3, 8);
@ -120,16 +118,11 @@ void UI_DisplayMain(void)
} }
else else
{ {
#ifdef ENABLE_DTMF_DECODER center_line_is_free = false;
center_line_is_free = false;
#endif
} }
UI_PrintString(String, 2, 0, 2 + (vfo_num * 3), 8); UI_PrintString(String, 2, 0, 2 + (vfo_num * 3), 8);
#ifdef ENABLE_DTMF_DECODER center_line_is_free = false;
center_line_is_free = false;
#endif
continue; continue;
} }
@ -236,9 +229,7 @@ void UI_DisplayMain(void)
{ // user entering a frequency { // user entering a frequency
UI_DisplayFrequency(gInputBox, 31, Line, true, false); UI_DisplayFrequency(gInputBox, 31, Line, true, false);
#ifdef ENABLE_DTMF_DECODER center_line_is_free = false;
center_line_is_free = false;
#endif
} }
else else
{ {