diff --git a/app/main.c b/app/main.c index 3372d81..f462b01 100644 --- a/app/main.c +++ b/app/main.c @@ -627,15 +627,11 @@ static void MAIN_Key_MENU(bool bKeyPressed, bool bKeyHeld) #ifdef ENABLE_FEAT_F4HWN // Exclude work with list 1, 2, 3 or all list - if(gScanStateDir != SCAN_OFF && (gEeprom.SCAN_LIST_DEFAULT > 0 && gEeprom.SCAN_LIST_DEFAULT < 5)) + if(gScanStateDir != SCAN_OFF) { if(FUNCTION_IsRx()) { - gTxVfo->SCANLIST1_PARTICIPATION = 0; - gTxVfo->SCANLIST2_PARTICIPATION = 0; - gTxVfo->SCANLIST3_PARTICIPATION = 0; - - SETTINGS_UpdateChannel(gTxVfo->CHANNEL_SAVE, gTxVfo, true, true, false); + gMR_ChannelExclude[gTxVfo->CHANNEL_SAVE] = true; gVfoConfigureMode = VFO_CONFIGURE; gFlagResetVfos = true; diff --git a/misc.c b/misc.c index 785dfc9..367863c 100644 --- a/misc.c +++ b/misc.c @@ -140,6 +140,7 @@ uint16_t gEEPROM_1F8A; uint16_t gEEPROM_1F8C; ChannelAttributes_t gMR_ChannelAttributes[FREQ_CHANNEL_LAST + 1]; +bool gMR_ChannelExclude[FREQ_CHANNEL_LAST + 1]; volatile uint16_t gBatterySaveCountdown_10ms = battery_save_count_10ms; diff --git a/misc.h b/misc.h index 14c57fd..b07e212 100644 --- a/misc.h +++ b/misc.h @@ -205,6 +205,7 @@ typedef union { } ChannelAttributes_t; extern ChannelAttributes_t gMR_ChannelAttributes[207]; +extern bool gMR_ChannelExclude[207]; extern volatile uint16_t gBatterySaveCountdown_10ms; diff --git a/radio.c b/radio.c index 738f7fb..0f85f38 100644 --- a/radio.c +++ b/radio.c @@ -62,6 +62,9 @@ bool RADIO_CheckValidChannel(uint16_t channel, bool checkScanList, uint8_t scanL const ChannelAttributes_t att = gMR_ChannelAttributes[channel]; + if (gMR_ChannelExclude[channel] == true) + return false; + if (att.band > BAND7_470MHz) return false; diff --git a/settings.c b/settings.c index 3e945ae..411f12b 100644 --- a/settings.c +++ b/settings.c @@ -300,6 +300,7 @@ void SETTINGS_InitEEPROM(void) att->__val = 0; att->band = 0x7; } + gMR_ChannelExclude[i] = false; } // 0F30..0F3F