Save 52 bytes

This commit is contained in:
Armel FAUVEAU
2025-02-11 01:16:54 +01:00
parent 7df26c44e8
commit b8b652b10e
3 changed files with 8 additions and 1 deletions

View File

@@ -276,8 +276,10 @@ static void CMD_051B(const uint8_t *pBuffer)
Reply.Data.Offset = pCmd->Offset;
Reply.Data.Size = pCmd->Size;
/*
if (bHasCustomAesKey)
bLocked = gIsLocked;
*/
if (!bLocked)
EEPROM_ReadBuffer(pCmd->Offset, Reply.Data.Data, pCmd->Size);
@@ -374,8 +376,10 @@ static void CMD_052D(const uint8_t *pBuffer)
bIsLocked = bHasCustomAesKey;
/*
if (!bIsLocked)
bIsLocked = IsBadChallenge(gCustomAesKey, gChallenge, pCmd->Response);
*/
if (!bIsLocked)
{

View File

@@ -36,7 +36,7 @@ bandscope() {
ENABLE_SPECTRUM=1 \
ENABLE_FMRADIO=0 \
ENABLE_AIRCOPY=0 \
ENABLE_FEAT_F4HWN_PMR=1 \
ENABLE_FEAT_F4HWN_PMR=0 \
ENABLE_NOAA=0 \
ENABLE_FEAT_F4HWN_RESCUE_OPS=0 \
EDITION_STRING=Bandscope \

View File

@@ -329,6 +329,8 @@ void SETTINGS_InitEEPROM(void)
// 0F30..0F3F
EEPROM_ReadBuffer(0x0F30, gCustomAesKey, sizeof(gCustomAesKey));
bHasCustomAesKey = false;
/*
for (unsigned int i = 0; i < ARRAY_SIZE(gCustomAesKey); i++)
{
if (gCustomAesKey[i] != 0xFFFFFFFFu)
@@ -337,6 +339,7 @@ void SETTINGS_InitEEPROM(void)
return;
}
}
*/
#ifdef ENABLE_FEAT_F4HWN
// 1FF0..0x1FF7