Skip to content

Commit

Permalink
STE 关闭时不发送尾音
Browse files Browse the repository at this point in the history
  • Loading branch information
losehu committed Jan 30, 2024
1 parent c0f71c8 commit 71938cb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
3 changes: 2 additions & 1 deletion app/app.c
Original file line number Diff line number Diff line change
Expand Up @@ -1217,7 +1217,8 @@ void APP_TimeSlice10ms(void)
if (gAlarmState == ALARM_STATE_TXALARM)
{
gAlarmState = ALARM_STATE_SITE_ALARM;
RADIO_EnableCxCSS();
if(gEeprom.TAIL_TONE_ELIMINATION)
RADIO_SendCssTail();
BK4819_SetupPowerAmplifier(0, 0);
BK4819_ToggleGpioOut(BK4819_GPIO1_PIN29_PA_ENABLE, false);
BK4819_Enable_AfDac_DiscMode_TxDsp();
Expand Down
8 changes: 5 additions & 3 deletions radio.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ void RADIO_SendEndOfTransmission(void)
DTMF_SendEndOfTransmission();

// send the CTCSS/DCS tail tone - allows the receivers to mute the usual FM squelch tail/crash
RADIO_EnableCxCSS();
if(gEeprom.TAIL_TONE_ELIMINATION)
RADIO_SendCssTail();
RADIO_SetupRegisters(false);
}

Expand Down Expand Up @@ -1064,7 +1065,7 @@ void RADIO_PrepareTX(void)
#endif
}

void RADIO_EnableCxCSS(void)
void RADIO_SendCssTail(void)
{
switch (gCurrentVfo->pTX->CodeType) {
case CODE_TYPE_DIGITAL:
Expand All @@ -1085,6 +1086,7 @@ void RADIO_PrepareCssTX(void)

SYSTEM_DelayMs(200);

RADIO_EnableCxCSS();
if(gEeprom.TAIL_TONE_ELIMINATION)
RADIO_SendCssTail();
RADIO_SetupRegisters(true);
}
2 changes: 1 addition & 1 deletion radio.h
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ void RADIO_SetTxParameters(void);
void RADIO_SetModulation(ModulationMode_t modulation);
void RADIO_SetVfoState(VfoState_t State);
void RADIO_PrepareTX(void);
void RADIO_EnableCxCSS(void);
void RADIO_SendCssTail(void);
void RADIO_PrepareCssTX(void);
void RADIO_SendEndOfTransmission(void);
void RADIO_SetupAGC(bool listeningAM, bool disable);
Expand Down

0 comments on commit 71938cb

Please sign in to comment.