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) {
SYSTEM_DelayMs(Delay * 10);
if (gCurrentFunction == FUNCTION_4 || gCurrentFunction == FUNCTION_2) {
if (gInfoCHAN_A->_0x0033 == true) {
BK4819_SetAF(BK4819_AF_7);
if (gInfoCHAN_A->IsAM == true) {
BK4819_SetAF(BK4819_AF_AM);
} else {
BK4819_SetAF(BK4819_AF_OPEN);
}
@ -321,8 +321,8 @@ void AUDIO_PlayQueuedVoice(void)
}
if (gCurrentFunction == FUNCTION_4 || gCurrentFunction == FUNCTION_2) {
if (gInfoCHAN_A->_0x0033 == true) {
BK4819_SetAF(BK4819_AF_7);
if (gInfoCHAN_A->IsAM == true) {
BK4819_SetAF(BK4819_AF_AM);
} else {
BK4819_SetAF(BK4819_AF_OPEN);
}

View File

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

View File

@ -38,7 +38,7 @@ void FUNCTION_Init(void)
if (gInfoCHAN_A->CHANNEL_SAVE < 207) {
gCopyOfCodeType = gCodeType;
if (g_20000381 == 0) {
if (gInfoCHAN_A->_0x0033 == true) {
if (gInfoCHAN_A->IsAM == true) {
gCopyOfCodeType = CODE_TYPE_OFF;
} else {
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) {
gEeprom.VfoInfo[VFO]._0x0033 = true;
gEeprom.VfoInfo[VFO].IsAM = true;
gEeprom.VfoInfo[VFO].SCRAMBLING_TYPE = 0;
gEeprom.VfoInfo[VFO].DTMF_DECODING_ENABLE = false;
gEeprom.VfoInfo[VFO].DCS[0].CodeType = CODE_TYPE_OFF;
gEeprom.VfoInfo[VFO].DCS[1].CodeType = CODE_TYPE_OFF;
} else {
gEeprom.VfoInfo[VFO]._0x0033 = false;
gEeprom.VfoInfo[VFO].IsAM = false;
}
RADIO_ConfigureSquelchAndOutputPower(pRadio);
@ -510,7 +510,7 @@ void RADIO_SetupRegisters(bool bSwitchToFunction0)
InterruptMask = 0x000C;
if (gInfoCHAN_A->CHANNEL_SAVE < 207) {
if (gInfoCHAN_A->_0x0033 != true) {
if (gInfoCHAN_A->IsAM != true) {
uint8_t CodeType;
uint8_t CodeWord;
@ -552,14 +552,14 @@ void RADIO_SetupRegisters(bool bSwitchToFunction0)
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);
// VOX_LOST VOX_FOUND
InterruptMask |= 0x0030;
} else {
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();
} else {
BK4819_EnableDTMF();

View File

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