Skip to content

Commit

Permalink
Revert "Update radio.c: simplify!"
Browse files Browse the repository at this point in the history
This reverts commit 32ee40b.
It took 20 bytes >.>
  • Loading branch information
prokrypt committed Jul 24, 2024
1 parent 32ee40b commit 2e17bc4
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions radio.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,15 @@ bool RADIO_CheckValidChannel(uint16_t channel, bool checkScanList, uint8_t scanL
//if (scanList ? !att.scanlist2 : !att.scanlist1)
// return false;

if ((scanList < 3 && !((att.scanlists >> (2 - scanList)) & 1)) ||
(scanList == 3 && att.scanlists != 0) ||
(scanList == 4 && att.scanlists == 0)) {
return false;
if(scanList<3){
if(!((att.scanlists >> scanList) & 1))
return false;
}
else if(scanList==3 && att.scanlists)
return false;
else if(scanList==4 && !att.scanlists)
return false;


/*
if(scanList == 0 && att.scanlist1 != 1) // scanlist 1
Expand Down

0 comments on commit 2e17bc4

Please sign in to comment.