Browse Source

* CAD detect fixed

pull/3/head
Scott Powell 1 year ago
parent
commit
f5f978a398
  1. 8
      src/helpers/CustomSX1262Wrapper.h
  2. 8
      src/helpers/CustomSX1268Wrapper.h

8
src/helpers/CustomSX1262Wrapper.h

@ -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(); }

8
src/helpers/CustomSX1268Wrapper.h

@ -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(); }

Loading…
Cancel
Save