mirror of
https://github.com/DualTachyon/uv-k5-firmware.git
synced 2025-01-18 17:03:58 +08:00
Added RADIO_SendEndOfTransmission.
This commit is contained in:
parent
9790425d5d
commit
1fdbee743c
4
app.c
4
app.c
@ -1418,8 +1418,8 @@ void FUN_00001150(void)
|
||||
GPIO_ClearBit(&GPIOC->DATA, GPIOC_PIN_AUDIO_PATH);
|
||||
g_2000036B = 0;
|
||||
if (gEeprom.ALARM_MODE == ALARM_MODE_TONE) {
|
||||
//Handle_DTMF_ID_and_Roger();
|
||||
//Enable_CxCSS();
|
||||
RADIO_SendEndOfTransmission();
|
||||
RADIO_EnableCxCSS();
|
||||
}
|
||||
g_200003B6 = 0x50;
|
||||
SYSTEM_DelayMs(5);
|
||||
|
28
radio.c
28
radio.c
@ -780,3 +780,31 @@ void RADIO_Whatever(void)
|
||||
RADIO_SetupRegisters(true);
|
||||
}
|
||||
|
||||
void RADIO_SendEndOfTransmission(void)
|
||||
{
|
||||
if (gEeprom.ROGER == ROGER_MODE_ROGER) {
|
||||
BK4819_PlayRoger();
|
||||
} else if (gEeprom.ROGER == ROGER_MODE_MDC) {
|
||||
BK4819_PlayRogerMDC();
|
||||
}
|
||||
if (g_200003BC == 0 && (gCrossTxRadioInfo->DTMF_PTT_ID_TX_MODE == PTT_ID_EOT || gCrossTxRadioInfo->DTMF_PTT_ID_TX_MODE == PTT_ID_BOTH)) {
|
||||
if (gEeprom.DTMF_SIDE_TONE) {
|
||||
GPIO_SetBit(&GPIOC->DATA, GPIOC_PIN_AUDIO_PATH);
|
||||
g_2000036B = 1;
|
||||
SYSTEM_DelayMs(60);
|
||||
}
|
||||
BK4819_EnterDTMF_TX(gEeprom.DTMF_SIDE_TONE);
|
||||
BK4819_PlayDTMFString(
|
||||
gEeprom.DTMF_DOWN_CODE,
|
||||
0,
|
||||
gEeprom.DTMF_FIRST_CODE_PERSIST_TIME,
|
||||
gEeprom.DTMF_HASH_CODE_PERSIST_TIME,
|
||||
gEeprom.DTMF_CODE_PERSIST_TIME,
|
||||
gEeprom.DTMF_CODE_INTERVAL_TIME
|
||||
);
|
||||
GPIO_ClearBit(&GPIOC->DATA, GPIOC_PIN_AUDIO_PATH);
|
||||
g_2000036B = 0;
|
||||
}
|
||||
BK4819_ExitDTMF_TX(true);
|
||||
}
|
||||
|
||||
|
12
radio.h
12
radio.h
@ -37,6 +37,15 @@ enum {
|
||||
BANDWIDTH_NARROW = 1U,
|
||||
};
|
||||
|
||||
enum PTT_ID_t {
|
||||
PTT_ID_OFF = 0U,
|
||||
PTT_ID_BOT = 1U,
|
||||
PTT_ID_EOT = 2U,
|
||||
PTT_ID_BOTH = 3U,
|
||||
};
|
||||
|
||||
typedef enum PTT_ID_t PTT_ID_t;
|
||||
|
||||
typedef struct {
|
||||
uint32_t Frequency;
|
||||
DCS_CodeType_t CodeType;
|
||||
@ -68,7 +77,7 @@ typedef struct VFO_Info_t {
|
||||
uint8_t SCANLIST2_PARTICIPATION;
|
||||
uint8_t Band;
|
||||
uint8_t DTMF_DECODING_ENABLE;
|
||||
uint8_t DTMF_PTT_ID_TX_MODE;
|
||||
PTT_ID_t DTMF_PTT_ID_TX_MODE;
|
||||
uint8_t BUSY_CHANNEL_LOCK;
|
||||
uint8_t AM_CHANNEL_MODE;
|
||||
bool IsAM;
|
||||
@ -100,6 +109,7 @@ void RADIO_SomethingWithTransmit(void);
|
||||
void RADIO_EnableCxCSS(void);
|
||||
void RADIO_Something(void);
|
||||
void RADIO_Whatever(void);
|
||||
void RADIO_SendEndOfTransmission(void);
|
||||
|
||||
#endif
|
||||
|
||||
|
10
settings.h
10
settings.h
@ -82,6 +82,14 @@ enum ALARM_Mode_t {
|
||||
|
||||
typedef enum ALARM_Mode_t ALARM_Mode_t;
|
||||
|
||||
enum ROGER_Mode_t {
|
||||
ROGER_MODE_OFF = 0U,
|
||||
ROGER_MODE_ROGER = 1U,
|
||||
ROGER_MODE_MDC = 2U,
|
||||
};
|
||||
|
||||
typedef enum ROGER_Mode_t ROGER_Mode_t;
|
||||
|
||||
typedef struct {
|
||||
uint8_t VfoChannel[2];
|
||||
uint8_t EEPROM_0E82_0E85[2];
|
||||
@ -127,7 +135,7 @@ typedef struct {
|
||||
bool AUTO_KEYPAD_LOCK;
|
||||
ALARM_Mode_t ALARM_MODE;
|
||||
POWER_OnDisplayMode_t POWER_ON_DISPLAY_MODE;
|
||||
uint8_t ROGER;
|
||||
ROGER_Mode_t ROGER;
|
||||
uint8_t REPEATER_TAIL_TONE_ELIMINATION;
|
||||
uint8_t KEY_1_SHORT_PRESS_ACTION;
|
||||
uint8_t KEY_1_LONG_PRESS_ACTION;
|
||||
|
Loading…
Reference in New Issue
Block a user