Add Not In List and All In List

This commit is contained in:
Armel FAUVEAU
2024-06-24 05:41:21 +02:00
parent d356541788
commit ee59118fce
11 changed files with 75 additions and 25 deletions

View File

@@ -195,7 +195,7 @@ static void NextFreqChannel(void)
static void NextMemChannel(void)
{
static unsigned int prev_mr_chan = 0;
const bool enabled = (gEeprom.SCAN_LIST_DEFAULT < 3) ? gEeprom.SCAN_LIST_ENABLED[gEeprom.SCAN_LIST_DEFAULT] : true;
const bool enabled = (gEeprom.SCAN_LIST_DEFAULT < 5) ? gEeprom.SCAN_LIST_ENABLED[gEeprom.SCAN_LIST_DEFAULT] : true;
const int chan1 = -1;
const int chan2 = -1;
const int chan3 = -1;
@@ -267,7 +267,7 @@ static void NextMemChannel(void)
if (!enabled || chan == 0xff)
{
chan = RADIO_FindNextChannel(gNextMrChannel + gScanStateDir, gScanStateDir, (gEeprom.SCAN_LIST_DEFAULT < 3) ? true : false, gEeprom.SCAN_LIST_DEFAULT);
chan = RADIO_FindNextChannel(gNextMrChannel + gScanStateDir, gScanStateDir, (gEeprom.SCAN_LIST_DEFAULT < 5) ? true : false, gEeprom.SCAN_LIST_DEFAULT);
if (chan == 0xFF)
{ // no valid channel found
chan = MR_CHANNEL_FIRST;