From 20a3e3b6053ed7007236cbc20cf1c211a1a37426 Mon Sep 17 00:00:00 2001 From: Krzysiek Egzmont Date: Sat, 28 Oct 2023 14:41:47 +0200 Subject: [PATCH] Fix STE not working when TX CTCSS/DCS is off Reverts: fde690a74aa6730e85cffe4e30076f0faabbed21: app.c 50a55e34ab8bf18ec29b9ae8674ec68d81107afe: radio.c --- app/app.c | 22 ++-------------------- radio.c | 26 ++++++++++---------------- 2 files changed, 12 insertions(+), 36 deletions(-) diff --git a/app/app.c b/app/app.c index 580f22d..ab633e6 100644 --- a/app/app.c +++ b/app/app.c @@ -773,27 +773,9 @@ static void CheckRadioInterrupts(void) void APP_EndTransmission(void) { // back to RX mode - RADIO_SendEndOfTransmission(); - - if (gCurrentVfo->pTX->CodeType != CODE_TYPE_OFF) - { // CTCSS/DCS is enabled - - //if (gEeprom.TAIL_NOTE_ELIMINATION && gEeprom.REPEATER_TAIL_TONE_ELIMINATION > 0) - if (gEeprom.TAIL_TONE_ELIMINATION) - { // send the CTCSS/DCS tail tone - allows the receivers to mute the usual FM squelch tail/crash - RADIO_EnableCxCSS(); - } - #if 0 - else - { // TX a short blank carrier - // this gives the receivers time to mute RX audio before we drop carrier - BK4819_ExitSubAu(); - SYSTEM_DelayMs(200); - } - #endif - } - + // send the CTCSS/DCS tail tone - allows the receivers to mute the usual FM squelch tail/crash + RADIO_EnableCxCSS(); RADIO_SetupRegisters(false); } diff --git a/radio.c b/radio.c index d13aae7..fae2733 100644 --- a/radio.c +++ b/radio.c @@ -1031,23 +1031,17 @@ void RADIO_PrepareTX(void) void RADIO_EnableCxCSS(void) { - switch (gCurrentVfo->pTX->CodeType) - { - default: - case CODE_TYPE_OFF: - break; - - case CODE_TYPE_CONTINUOUS_TONE: - BK4819_EnableCTCSS(); - SYSTEM_DelayMs(200); - break; - - case CODE_TYPE_DIGITAL: - case CODE_TYPE_REVERSE_DIGITAL: - BK4819_EnableCDCSS(); - SYSTEM_DelayMs(200); - break; + switch (gCurrentVfo->pTX->CodeType) { + case CODE_TYPE_DIGITAL: + case CODE_TYPE_REVERSE_DIGITAL: + BK4819_EnableCDCSS(); + break; + default: + BK4819_EnableCTCSS(); + break; } + + SYSTEM_DelayMs(200); } void RADIO_PrepareCssTX(void)