Improve exclude feature
This commit is contained in:
@@ -627,15 +627,11 @@ static void MAIN_Key_MENU(bool bKeyPressed, bool bKeyHeld)
|
|||||||
|
|
||||||
#ifdef ENABLE_FEAT_F4HWN
|
#ifdef ENABLE_FEAT_F4HWN
|
||||||
// Exclude work with list 1, 2, 3 or all list
|
// 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())
|
if(FUNCTION_IsRx())
|
||||||
{
|
{
|
||||||
gTxVfo->SCANLIST1_PARTICIPATION = 0;
|
gMR_ChannelExclude[gTxVfo->CHANNEL_SAVE] = true;
|
||||||
gTxVfo->SCANLIST2_PARTICIPATION = 0;
|
|
||||||
gTxVfo->SCANLIST3_PARTICIPATION = 0;
|
|
||||||
|
|
||||||
SETTINGS_UpdateChannel(gTxVfo->CHANNEL_SAVE, gTxVfo, true, true, false);
|
|
||||||
|
|
||||||
gVfoConfigureMode = VFO_CONFIGURE;
|
gVfoConfigureMode = VFO_CONFIGURE;
|
||||||
gFlagResetVfos = true;
|
gFlagResetVfos = true;
|
||||||
|
1
misc.c
1
misc.c
@@ -140,6 +140,7 @@ uint16_t gEEPROM_1F8A;
|
|||||||
uint16_t gEEPROM_1F8C;
|
uint16_t gEEPROM_1F8C;
|
||||||
|
|
||||||
ChannelAttributes_t gMR_ChannelAttributes[FREQ_CHANNEL_LAST + 1];
|
ChannelAttributes_t gMR_ChannelAttributes[FREQ_CHANNEL_LAST + 1];
|
||||||
|
bool gMR_ChannelExclude[FREQ_CHANNEL_LAST + 1];
|
||||||
|
|
||||||
volatile uint16_t gBatterySaveCountdown_10ms = battery_save_count_10ms;
|
volatile uint16_t gBatterySaveCountdown_10ms = battery_save_count_10ms;
|
||||||
|
|
||||||
|
1
misc.h
1
misc.h
@@ -205,6 +205,7 @@ typedef union {
|
|||||||
} ChannelAttributes_t;
|
} ChannelAttributes_t;
|
||||||
|
|
||||||
extern ChannelAttributes_t gMR_ChannelAttributes[207];
|
extern ChannelAttributes_t gMR_ChannelAttributes[207];
|
||||||
|
extern bool gMR_ChannelExclude[207];
|
||||||
|
|
||||||
extern volatile uint16_t gBatterySaveCountdown_10ms;
|
extern volatile uint16_t gBatterySaveCountdown_10ms;
|
||||||
|
|
||||||
|
3
radio.c
3
radio.c
@@ -62,6 +62,9 @@ bool RADIO_CheckValidChannel(uint16_t channel, bool checkScanList, uint8_t scanL
|
|||||||
|
|
||||||
const ChannelAttributes_t att = gMR_ChannelAttributes[channel];
|
const ChannelAttributes_t att = gMR_ChannelAttributes[channel];
|
||||||
|
|
||||||
|
if (gMR_ChannelExclude[channel] == true)
|
||||||
|
return false;
|
||||||
|
|
||||||
if (att.band > BAND7_470MHz)
|
if (att.band > BAND7_470MHz)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@@ -300,6 +300,7 @@ void SETTINGS_InitEEPROM(void)
|
|||||||
att->__val = 0;
|
att->__val = 0;
|
||||||
att->band = 0x7;
|
att->band = 0x7;
|
||||||
}
|
}
|
||||||
|
gMR_ChannelExclude[i] = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 0F30..0F3F
|
// 0F30..0F3F
|
||||||
|
Reference in New Issue
Block a user