pull/42/head
sh123 2021-11-20 15:07:10 +02:00
rodzic 589d4d4103
commit fb541e2a48
2 zmienionych plików z 8 dodań i 4 usunięć

Wyświetl plik

@ -46,8 +46,8 @@
// CAD and ISR usage selection
#ifdef USE_SX126X
#define CFG_LORA_USE_ISR false // true - read incoming data in ISR, false - do not read in ISR
#define CFG_LORA_USE_CAD false // set to true to utilize carrier detection
#define CFG_LORA_USE_ISR false // reading in ISR does not work on sx126x
#define CFG_LORA_USE_CAD true // do not transmit if channel is busy
#else
#define CFG_LORA_USE_ISR true // true - read incoming data in ISR, false - do not read in ISR
#define CFG_LORA_USE_CAD true // set to true to utilize carrier detection

Wyświetl plik

@ -348,10 +348,14 @@ void Service::loop()
}
bool Service::isLoraRxBusy() {
#if defined(USE_RADIOLIB) && !defined(USE_SX126X)
#ifdef USE_RADIOLIB
#ifdef USE_SX126X
return config_.LoraUseCad && loraDataAvailable_;
#else
return config_.LoraUseCad && (radio_->getModemStatus() & 0x01); // SX1278_STATUS_SIG_DETECT
#endif
#else
return loraDataAvailable_;
return false;
#endif
}