Clean SCRAMBLER again...and save 200 octets

This commit is contained in:
Armel FAUVEAU
2024-02-10 00:52:39 +01:00
parent 3cecf8b975
commit 5fadf4c6f3
4 changed files with 17 additions and 1 deletions

View File

@@ -235,8 +235,10 @@ void RADIO_ConfigureChannel(const unsigned int VFO, const unsigned int configure
#ifndef ENABLE_FEAT_F4HWN
if (tmp > (ARRAY_SIZE(gSubMenu_SCRAMBLER) - 1))
tmp = 0;
#endif
pVfo->SCRAMBLING_TYPE = tmp;
#else
pVfo->SCRAMBLING_TYPE = 0;
#endif
pVfo->freq_config_RX.CodeType = (data[2] >> 0) & 0x0F;
pVfo->freq_config_TX.CodeType = (data[2] >> 4) & 0x0F;
@@ -711,10 +713,14 @@ void RADIO_SetupRegisters(bool switchToForeground)
break;
}
#ifndef ENABLE_FEAT_F4HWN
if (gRxVfo->SCRAMBLING_TYPE > 0 && gSetting_ScrambleEnable)
BK4819_EnableScramble(gRxVfo->SCRAMBLING_TYPE - 1);
else
BK4819_DisableScramble();
#else
BK4819_DisableScramble();
#endif
}
}
#ifdef ENABLE_NOAA