FIX #166: Switching to AM overwrites channel CTCSS/DCS (and some other) settings

This commit is contained in:
Krzysiek Egzmont
2023-12-02 18:36:00 +01:00
parent 235a1a2f14
commit b505f81958
2 changed files with 1 additions and 15 deletions

View File

@@ -415,8 +415,7 @@ void MENU_AcceptSetting(void)
case MENU_R_DCS: {
if (gSubMenuSelection == 0) {
if (pConfig->CodeType != CODE_TYPE_DIGITAL && pConfig->CodeType != CODE_TYPE_REVERSE_DIGITAL) {
gRequestSaveChannel = 1;
if (pConfig->CodeType == CODE_TYPE_CONTINUOUS_TONE) {
return;
}
pConfig->Code = 0;
@@ -440,19 +439,14 @@ void MENU_AcceptSetting(void)
case MENU_R_CTCS: {
if (gSubMenuSelection == 0) {
if (pConfig->CodeType != CODE_TYPE_CONTINUOUS_TONE) {
gRequestSaveChannel = 1;
return;
}
pConfig->Code = 0;
pConfig->CodeType = CODE_TYPE_OFF;
BK4819_ExitSubAu();
}
else {
pConfig->Code = gSubMenuSelection - 1;
pConfig->CodeType = CODE_TYPE_CONTINUOUS_TONE;
BK4819_SetCTCSSFrequency(CTCSS_Options[pConfig->Code]);
}
gRequestSaveChannel = 1;

View File

@@ -404,14 +404,6 @@ void RADIO_ConfigureChannel(const unsigned int VFO, const unsigned int configure
pConfig->Frequency = 43300000;
}
if (pVfo->Modulation != MODULATION_FM)
{ // freq/chan is in AM mode
pVfo->SCRAMBLING_TYPE = 0;
// pVfo->DTMF_DECODING_ENABLE = false; // no reason to disable DTMF decoding, aircraft use it on SSB
pVfo->freq_config_RX.CodeType = CODE_TYPE_OFF;
pVfo->freq_config_TX.CodeType = CODE_TYPE_OFF;
}
pVfo->Compander = att.compander;
RADIO_ConfigureSquelchAndOutputPower(pVfo);