Revert "Explicitly set CAD symbols, improve slot time calculation and adjust …" (#5765)

This reverts commit 9cc79b1d1e.
This commit is contained in:
Ben Meadors
2025-01-05 18:55:55 -06:00
committed by GitHub
parent 9cc79b1d1e
commit 4fcf7fe027
5 changed files with 15 additions and 53 deletions

View File

@@ -299,17 +299,10 @@ template <typename T> void SX126xInterface<T>::startReceive()
template <typename T> bool SX126xInterface<T>::isChannelActive()
{
// check if we can detect a LoRa preamble on the current channel
ChannelScanConfig_t cfg = {.cad = {.symNum = NUM_SYM_CAD,
.detPeak = RADIOLIB_SX126X_CAD_PARAM_DEFAULT,
.detMin = RADIOLIB_SX126X_CAD_PARAM_DEFAULT,
.exitMode = RADIOLIB_SX126X_CAD_PARAM_DEFAULT,
.timeout = 0,
.irqFlags = RADIOLIB_IRQ_CAD_DEFAULT_FLAGS,
.irqMask = RADIOLIB_IRQ_CAD_DEFAULT_MASK}};
int16_t result;
setStandby();
result = lora.scanChannel(cfg);
result = lora.scanChannel();
if (result == RADIOLIB_LORA_DETECTED)
return true;
if (result != RADIOLIB_CHANNEL_FREE)