通过写频软件开关首尾音本地播放

This commit is contained in:
Silent YANG 2024-01-20 08:12:09 -08:00
parent c669ec34de
commit 425cd52534
3 changed files with 14 additions and 9 deletions

View file

@ -1759,8 +1759,12 @@ void BK4819_PrepareFSKReceive(void)
#endif #endif
BK4819_EnterTxMute(); BK4819_EnterTxMute();
AUDIO_AudioPathOn(); if(gEeprom.MDC_AUDIO_LOCAL){
BK4819_SetAF(BK4819_AF_BEEP); AUDIO_AudioPathOn();
BK4819_SetAF(BK4819_AF_BEEP);
}else{
BK4819_SetAF(BK4819_AF_MUTE);
}
BK4819_WriteRegister(BK4819_REG_70, BK4819_REG_70_ENABLE_TONE1 | (66u << BK4819_REG_70_SHIFT_TONE1_TUNING_GAIN)); BK4819_WriteRegister(BK4819_REG_70, BK4819_REG_70_ENABLE_TONE1 | (66u << BK4819_REG_70_SHIFT_TONE1_TUNING_GAIN));
@ -2173,14 +2177,13 @@ void BK4819_enable_mdc1200_rx(const bool enable)
// BK4819_REG_30_ENABLE_RX_DSP | // BK4819_REG_30_ENABLE_RX_DSP |
0); 0);
#if 0 if(gEeprom.MDC_AUDIO_LOCAL){
GPIO_ClearBit(&GPIOC->DATA, 4);
BK4819_SetAF(BK4819_AF_MUTE);
#else
// let the user hear the FSK being sent
BK4819_SetAF(BK4819_AF_BEEP); BK4819_SetAF(BK4819_AF_BEEP);
GPIO_SetBit(&GPIOC->DATA, 4); GPIO_SetBit(&GPIOC->DATA, 4);
#endif }else{
GPIO_ClearBit(&GPIOC->DATA, 4);
BK4819_SetAF(BK4819_AF_MUTE);
}
// SYSTEM_DelayMs(2); // SYSTEM_DelayMs(2);
// REG_51 // REG_51

View file

@ -124,15 +124,16 @@ void SETTINGS_InitEEPROM(void)
gEeprom.POWER_ON_DISPLAY_MODE = (Data[7] < 4) ? Data[7] : POWER_ON_DISPLAY_MODE_NONE; gEeprom.POWER_ON_DISPLAY_MODE = (Data[7] < 4) ? Data[7] : POWER_ON_DISPLAY_MODE_NONE;
#endif #endif
#ifdef ENABLE_CUSTOM_SIDEFUNCTIONS
// 1FF8..1FFF // 1FF8..1FFF
EEPROM_ReadBuffer(0x1FF8, Data, 8); EEPROM_ReadBuffer(0x1FF8, Data, 8);
#ifdef ENABLE_CUSTOM_SIDEFUNCTIONS
gEeprom.KEY_M_LONG_PRESS_ACTION = (Data[0] < ACTION_OPT_LEN) ? Data[0] : ACTION_OPT_SWITCH_DEMODUL; gEeprom.KEY_M_LONG_PRESS_ACTION = (Data[0] < ACTION_OPT_LEN) ? Data[0] : ACTION_OPT_SWITCH_DEMODUL;
gEeprom.KEY_1_SHORT_PRESS_ACTION = (Data[1] < ACTION_OPT_LEN-3) ? Data[1] : ACTION_OPT_MONITOR; gEeprom.KEY_1_SHORT_PRESS_ACTION = (Data[1] < ACTION_OPT_LEN-3) ? Data[1] : ACTION_OPT_MONITOR;
gEeprom.KEY_1_LONG_PRESS_ACTION = (Data[2] < ACTION_OPT_LEN) ? Data[2] : ACTION_OPT_D_DCD; gEeprom.KEY_1_LONG_PRESS_ACTION = (Data[2] < ACTION_OPT_LEN) ? Data[2] : ACTION_OPT_D_DCD;
gEeprom.KEY_2_SHORT_PRESS_ACTION = (Data[3] < ACTION_OPT_LEN-3) ? Data[3] : ACTION_OPT_WIDTH; gEeprom.KEY_2_SHORT_PRESS_ACTION = (Data[3] < ACTION_OPT_LEN-3) ? Data[3] : ACTION_OPT_WIDTH;
gEeprom.KEY_2_LONG_PRESS_ACTION = (Data[4] < ACTION_OPT_LEN) ? Data[4] : ACTION_OPT_FLASHLIGHT; gEeprom.KEY_2_LONG_PRESS_ACTION = (Data[4] < ACTION_OPT_LEN) ? Data[4] : ACTION_OPT_FLASHLIGHT;
#endif #endif
gEeprom.MDC_AUDIO_LOCAL = Data[5];
// 0E98..0E9F // 0E98..0E9F
EEPROM_ReadBuffer(0x0E98, Data, 8); EEPROM_ReadBuffer(0x0E98, Data, 8);

View file

@ -208,6 +208,7 @@ typedef struct {
uint8_t KEY_2_SHORT_PRESS_ACTION; uint8_t KEY_2_SHORT_PRESS_ACTION;
uint8_t KEY_2_LONG_PRESS_ACTION; uint8_t KEY_2_LONG_PRESS_ACTION;
#endif #endif
uint8_t MDC_AUDIO_LOCAL;
uint8_t MIC_SENSITIVITY; uint8_t MIC_SENSITIVITY;
uint8_t MIC_SENSITIVITY_TUNING; uint8_t MIC_SENSITIVITY_TUNING;
uint8_t CHAN_1_CALL; uint8_t CHAN_1_CALL;