* CAD detect fixed

This commit is contained in:
Scott Powell 2025-01-22 21:48:18 +11:00
parent 932d845922
commit f5f978a398
2 changed files with 8 additions and 8 deletions

View file

@ -9,12 +9,12 @@ public:
bool isReceiving() override {
if (((CustomSX1262 *)_radio)->isReceiving()) return true;
#if 0 // has BUG :-( commenting out for now
idle(); // put sx126x into standby
// do some basic CAD (blocks for ~12780 micros (on SF 10)!)
if (((CustomSX1262 *)_radio)->scanChannel() == RADIOLIB_LORA_DETECTED) return true;
#endif
return false;
bool activity = (((CustomSX1262 *)_radio)->scanChannel() == RADIOLIB_LORA_DETECTED);
idle();
return activity;
}
float getLastRSSI() const override { return ((CustomSX1262 *)_radio)->getRSSI(); }
float getLastSNR() const override { return ((CustomSX1262 *)_radio)->getSNR(); }

View file

@ -9,12 +9,12 @@ public:
bool isReceiving() override {
if (((CustomSX1268 *)_radio)->isReceiving()) return true;
#if 0 // has BUG :-( commenting out for now
idle(); // put sx126x into standby
// do some basic CAD (blocks for ~12780 micros (on SF 10)!)
if (((CustomSX1268 *)_radio)->scanChannel() == RADIOLIB_LORA_DETECTED) return true;
#endif
return false;
bool activity = (((CustomSX1268 *)_radio)->scanChannel() == RADIOLIB_LORA_DETECTED);
idle();
return activity;
}
float getLastRSSI() const override { return ((CustomSX1268 *)_radio)->getRSSI(); }
float getLastSNR() const override { return ((CustomSX1268 *)_radio)->getSNR(); }