Read RSSI only for valid channels - makes scan even faster.

This commit is contained in:
Nunu 2023-12-24 15:14:02 +01:00
parent 5711afc637
commit 5b6b8c1d9a

View File

@ -337,6 +337,11 @@ uint16_t GetRssi() {
uint16_t rssi;
// SYSTICK_DelayUs(800);
// testing autodelay based on Glitch value
// Read only for valid channels (makes it even faster for ppl with less than 200 channels stored)
if(RADIO_CheckValidChannel(scanInfo.i, false, 0)==false)
return 0;
while ((BK4819_ReadRegister(0x63) & 0b11111111) >= 255) {
SYSTICK_DelayUs(100);
}