mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
* CAD detect fixed
This commit is contained in:
parent
932d845922
commit
f5f978a398
2 changed files with 8 additions and 8 deletions
|
|
@ -9,12 +9,12 @@ public:
|
||||||
bool isReceiving() override {
|
bool isReceiving() override {
|
||||||
if (((CustomSX1262 *)_radio)->isReceiving()) return true;
|
if (((CustomSX1262 *)_radio)->isReceiving()) return true;
|
||||||
|
|
||||||
#if 0 // has BUG :-( commenting out for now
|
|
||||||
idle(); // put sx126x into standby
|
idle(); // put sx126x into standby
|
||||||
// do some basic CAD (blocks for ~12780 micros (on SF 10)!)
|
// do some basic CAD (blocks for ~12780 micros (on SF 10)!)
|
||||||
if (((CustomSX1262 *)_radio)->scanChannel() == RADIOLIB_LORA_DETECTED) return true;
|
bool activity = (((CustomSX1262 *)_radio)->scanChannel() == RADIOLIB_LORA_DETECTED);
|
||||||
#endif
|
idle();
|
||||||
return false;
|
|
||||||
|
return activity;
|
||||||
}
|
}
|
||||||
float getLastRSSI() const override { return ((CustomSX1262 *)_radio)->getRSSI(); }
|
float getLastRSSI() const override { return ((CustomSX1262 *)_radio)->getRSSI(); }
|
||||||
float getLastSNR() const override { return ((CustomSX1262 *)_radio)->getSNR(); }
|
float getLastSNR() const override { return ((CustomSX1262 *)_radio)->getSNR(); }
|
||||||
|
|
|
||||||
|
|
@ -9,12 +9,12 @@ public:
|
||||||
bool isReceiving() override {
|
bool isReceiving() override {
|
||||||
if (((CustomSX1268 *)_radio)->isReceiving()) return true;
|
if (((CustomSX1268 *)_radio)->isReceiving()) return true;
|
||||||
|
|
||||||
#if 0 // has BUG :-( commenting out for now
|
|
||||||
idle(); // put sx126x into standby
|
idle(); // put sx126x into standby
|
||||||
// do some basic CAD (blocks for ~12780 micros (on SF 10)!)
|
// do some basic CAD (blocks for ~12780 micros (on SF 10)!)
|
||||||
if (((CustomSX1268 *)_radio)->scanChannel() == RADIOLIB_LORA_DETECTED) return true;
|
bool activity = (((CustomSX1268 *)_radio)->scanChannel() == RADIOLIB_LORA_DETECTED);
|
||||||
#endif
|
idle();
|
||||||
return false;
|
|
||||||
|
return activity;
|
||||||
}
|
}
|
||||||
float getLastRSSI() const override { return ((CustomSX1268 *)_radio)->getRSSI(); }
|
float getLastRSSI() const override { return ((CustomSX1268 *)_radio)->getRSSI(); }
|
||||||
float getLastSNR() const override { return ((CustomSX1268 *)_radio)->getSNR(); }
|
float getLastSNR() const override { return ((CustomSX1268 *)_radio)->getSNR(); }
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue