Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
KOMP0T1K committed Jan 29, 2024
1 parent 4f95ab1 commit 4d8abbf
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 15 deletions.
10 changes: 5 additions & 5 deletions app/app.c
Original file line number Diff line number Diff line change
Expand Up @@ -727,9 +727,9 @@ static void CheckRadioInterrupts(void)
}
}

void APP_EndTransmission(void)
void APP_EndTransmission(bool isMessengerPacket)
{ // back to RX mode
RADIO_SendEndOfTransmission();
RADIO_SendEndOfTransmission(isMessengerPacket);
// send the CTCSS/DCS tail tone - allows the receivers to mute the usual FM squelch tail/crash
RADIO_EnableCxCSS();
RADIO_SetupRegisters(false);
Expand Down Expand Up @@ -785,7 +785,7 @@ void APP_EndTransmission(void)
}
else
{
APP_EndTransmission();
APP_EndTransmission(false);

if (gEeprom.REPEATER_TAIL_TONE_ELIMINATION == 0)
{
Expand Down Expand Up @@ -836,7 +836,7 @@ void APP_Update(void)
gTxTimeoutReached = false;

gFlagEndTransmission = true;
APP_EndTransmission();
APP_EndTransmission(false);

AUDIO_PlayBeep(BEEP_880HZ_60MS_TRIPLE_BEEP);

Expand Down Expand Up @@ -1599,7 +1599,7 @@ void APP_TimeSlice500ms(void)

if (gEeprom.ALARM_MODE == ALARM_MODE_TONE)
{
RADIO_SendEndOfTransmission();
RADIO_SendEndOfTransmission(false);
RADIO_EnableCxCSS();
}

Expand Down
2 changes: 1 addition & 1 deletion app/app.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
extern bool gPlayMSGRing;
#endif

void APP_EndTransmission(void);
void APP_EndTransmission(bool isMessengerPacket);
void APP_StartListening(FUNCTION_Type_t Function);
uint32_t APP_SetFreqByStepAndLimits(VFO_Info_t *pInfo, int8_t direction, uint32_t lower, uint32_t upper);
uint32_t APP_SetFrequencyByStep(VFO_Info_t *pInfo, int8_t direction);
Expand Down
2 changes: 1 addition & 1 deletion app/generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ void GENERIC_Key_PTT(bool bKeyPressed)
}
else
{
APP_EndTransmission();
APP_EndTransmission(false);

if (gEeprom.REPEATER_TAIL_TONE_ELIMINATION == 0)
FUNCTION_Select(FUNCTION_FOREGROUND);
Expand Down
2 changes: 1 addition & 1 deletion app/messenger.c
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ void MSG_SendPacket(union DataPacket packet) {

SYSTEM_DelayMs(100);

APP_EndTransmission();
APP_EndTransmission(true);
// this must be run after end of TX, otherwise radio will still TX transmit without even RED LED on
FUNCTION_Select(FUNCTION_FOREGROUND);

Expand Down
14 changes: 8 additions & 6 deletions radio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1064,13 +1064,15 @@ void RADIO_PrepareCssTX(void)
RADIO_SetupRegisters(true);
}

void RADIO_SendEndOfTransmission(void)
void RADIO_SendEndOfTransmission(bool isMessengerPacket)
{
if (gEeprom.ROGER == ROGER_MODE_ROGER)
BK4819_PlayRoger();
else
if (gEeprom.ROGER == ROGER_MODE_MDC)
BK4819_PlayRogerMDC();
if (!isMessengerPacket) {
if (gEeprom.ROGER == ROGER_MODE_ROGER)
BK4819_PlayRoger();
else
if (gEeprom.ROGER == ROGER_MODE_MDC)
BK4819_PlayRogerMDC();
}

if (gCurrentVfo->DTMF_PTT_ID_TX_MODE == PTT_ID_APOLLO)
BK4819_PlaySingleTone(2475, 250, 28, gEeprom.DTMF_SIDE_TONE);
Expand Down
2 changes: 1 addition & 1 deletion radio.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ void RADIO_SetVfoState(VfoState_t State);
void RADIO_PrepareTX(void);
void RADIO_EnableCxCSS(void);
void RADIO_PrepareCssTX(void);
void RADIO_SendEndOfTransmission(void);
void RADIO_SendEndOfTransmission(bool isMessengerPacket);
#endif

#ifdef ENABLE_SPECTRUM_CHANNEL_SCAN
Expand Down

0 comments on commit 4d8abbf

Please sign in to comment.