Renamed newly found AM variables.

This commit is contained in:
Dual Tachyon 2023-08-21 23:37:36 +01:00
parent 54834533cc
commit f9bea2647a
5 changed files with 12 additions and 12 deletions

View File

@ -208,8 +208,8 @@ void AUDIO_PlaySingleVoice(bool bFlag)
if (bFlag) { if (bFlag) {
SYSTEM_DelayMs(Delay * 10); SYSTEM_DelayMs(Delay * 10);
if (gCurrentFunction == FUNCTION_4 || gCurrentFunction == FUNCTION_2) { if (gCurrentFunction == FUNCTION_4 || gCurrentFunction == FUNCTION_2) {
if (gInfoCHAN_A->_0x0033 == true) { if (gInfoCHAN_A->IsAM == true) {
BK4819_SetAF(BK4819_AF_7); BK4819_SetAF(BK4819_AF_AM);
} else { } else {
BK4819_SetAF(BK4819_AF_OPEN); BK4819_SetAF(BK4819_AF_OPEN);
} }
@ -321,8 +321,8 @@ void AUDIO_PlayQueuedVoice(void)
} }
if (gCurrentFunction == FUNCTION_4 || gCurrentFunction == FUNCTION_2) { if (gCurrentFunction == FUNCTION_4 || gCurrentFunction == FUNCTION_2) {
if (gInfoCHAN_A->_0x0033 == true) { if (gInfoCHAN_A->IsAM == true) {
BK4819_SetAF(BK4819_AF_7); BK4819_SetAF(BK4819_AF_AM);
} else { } else {
BK4819_SetAF(BK4819_AF_OPEN); BK4819_SetAF(BK4819_AF_OPEN);
} }

View File

@ -27,7 +27,7 @@ enum BK4819_AF_Type_t {
BK4819_AF_ALAM = 2U, BK4819_AF_ALAM = 2U,
BK4819_AF_BEEP = 3U, BK4819_AF_BEEP = 3U,
BK4819_AF_CTCO = 6U, BK4819_AF_CTCO = 6U,
BK4819_AF_7 = 7U, BK4819_AF_AM = 7U,
BK4819_AF_FSKO = 8U, BK4819_AF_FSKO = 8U,
}; };

View File

@ -38,7 +38,7 @@ void FUNCTION_Init(void)
if (gInfoCHAN_A->CHANNEL_SAVE < 207) { if (gInfoCHAN_A->CHANNEL_SAVE < 207) {
gCopyOfCodeType = gCodeType; gCopyOfCodeType = gCodeType;
if (g_20000381 == 0) { if (g_20000381 == 0) {
if (gInfoCHAN_A->_0x0033 == true) { if (gInfoCHAN_A->IsAM == true) {
gCopyOfCodeType = CODE_TYPE_OFF; gCopyOfCodeType = CODE_TYPE_OFF;
} else { } else {
gCopyOfCodeType = gInfoCHAN_A->pDCS_Current->CodeType; gCopyOfCodeType = gInfoCHAN_A->pDCS_Current->CodeType;

10
radio.c
View File

@ -340,13 +340,13 @@ void RADIO_ConfigureChannel(uint8_t VFO, uint32_t Arg)
} }
if (gEeprom.VfoInfo[VFO].Band == BAND2_108MHz && gEeprom.VfoInfo[VFO].AM_CHANNEL_MODE == true) { if (gEeprom.VfoInfo[VFO].Band == BAND2_108MHz && gEeprom.VfoInfo[VFO].AM_CHANNEL_MODE == true) {
gEeprom.VfoInfo[VFO]._0x0033 = true; gEeprom.VfoInfo[VFO].IsAM = true;
gEeprom.VfoInfo[VFO].SCRAMBLING_TYPE = 0; gEeprom.VfoInfo[VFO].SCRAMBLING_TYPE = 0;
gEeprom.VfoInfo[VFO].DTMF_DECODING_ENABLE = false; gEeprom.VfoInfo[VFO].DTMF_DECODING_ENABLE = false;
gEeprom.VfoInfo[VFO].DCS[0].CodeType = CODE_TYPE_OFF; gEeprom.VfoInfo[VFO].DCS[0].CodeType = CODE_TYPE_OFF;
gEeprom.VfoInfo[VFO].DCS[1].CodeType = CODE_TYPE_OFF; gEeprom.VfoInfo[VFO].DCS[1].CodeType = CODE_TYPE_OFF;
} else { } else {
gEeprom.VfoInfo[VFO]._0x0033 = false; gEeprom.VfoInfo[VFO].IsAM = false;
} }
RADIO_ConfigureSquelchAndOutputPower(pRadio); RADIO_ConfigureSquelchAndOutputPower(pRadio);
@ -510,7 +510,7 @@ void RADIO_SetupRegisters(bool bSwitchToFunction0)
InterruptMask = 0x000C; InterruptMask = 0x000C;
if (gInfoCHAN_A->CHANNEL_SAVE < 207) { if (gInfoCHAN_A->CHANNEL_SAVE < 207) {
if (gInfoCHAN_A->_0x0033 != true) { if (gInfoCHAN_A->IsAM != true) {
uint8_t CodeType; uint8_t CodeType;
uint8_t CodeWord; uint8_t CodeWord;
@ -552,14 +552,14 @@ void RADIO_SetupRegisters(bool bSwitchToFunction0)
InterruptMask = 0x00CC; InterruptMask = 0x00CC;
} }
if (gEeprom.VOX_SWITCH == true && gFmMute != true && gCrossTxRadioInfo->CHANNEL_SAVE < 207 && gCrossTxRadioInfo->_0x0033 != true) { if (gEeprom.VOX_SWITCH == true && gFmMute != true && gCrossTxRadioInfo->CHANNEL_SAVE < 207 && gCrossTxRadioInfo->IsAM != true) {
BK4819_EnableVox(gEeprom.VOX1_THRESHOLD, gEeprom.VOX0_THRESHOLD); BK4819_EnableVox(gEeprom.VOX1_THRESHOLD, gEeprom.VOX0_THRESHOLD);
// VOX_LOST VOX_FOUND // VOX_LOST VOX_FOUND
InterruptMask |= 0x0030; InterruptMask |= 0x0030;
} else { } else {
BK4819_DisableVox(); BK4819_DisableVox();
} }
if ((gInfoCHAN_A->_0x0033 == true) || (gInfoCHAN_A->DTMF_DECODING_ENABLE != true && (gSetting_KILLED != true))) { if ((gInfoCHAN_A->IsAM == true) || (gInfoCHAN_A->DTMF_DECODING_ENABLE != true && (gSetting_KILLED != true))) {
BK4819_DisableDTMF(); BK4819_DisableDTMF();
} else { } else {
BK4819_EnableDTMF(); BK4819_EnableDTMF();

View File

@ -71,7 +71,7 @@ typedef struct VFO_Info_t {
uint8_t DTMF_PTT_ID_TX_MODE; uint8_t DTMF_PTT_ID_TX_MODE;
uint8_t BUSY_CHANNEL_LOCK; uint8_t BUSY_CHANNEL_LOCK;
uint8_t AM_CHANNEL_MODE; uint8_t AM_CHANNEL_MODE;
bool _0x0033; bool IsAM;
char Name[16]; char Name[16];
} VFO_Info_t; } VFO_Info_t;