Radiolib API Changes

pull/4612/head
Thomas Göttgens 2024-09-03 13:12:39 +02:00
rodzic d83f8edd54
commit 6fc4a1754b
5 zmienionych plików z 11 dodań i 4 usunięć

Wyświetl plik

@ -25,7 +25,7 @@ template <class T> class LR11x0Interface : public RadioLibInterface
/// Prepare hardware for sleep. Call this _only_ for deep sleep, not needed for light sleep.
virtual bool sleep() override;
bool isIRQPending() override { return lora.getIrqStatus() != 0; }
bool isIRQPending() override { return lora.getIrqFlags() != 0; }
protected:
/**

Wyświetl plik

@ -12,6 +12,9 @@
#define SX126X_MAX_POWER 22
#endif
#define RADIOLIB_SX126X_IRQ_RX_DEFAULT \
RADIOLIB_SX126X_IRQ_RX_DONE | RADIOLIB_SX126X_IRQ_TIMEOUT | RADIOLIB_SX126X_IRQ_CRC_ERR | RADIOLIB_SX126X_IRQ_HEADER_ERR
template <typename T>
SX126xInterface<T>::SX126xInterface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst,
RADIOLIB_PIN_TYPE busy)
@ -301,7 +304,7 @@ template <typename T> bool SX126xInterface<T>::isActivelyReceiving()
// The IRQ status will be cleared when we start our read operation. Check if we've started a header, but haven't yet
// received and handled the interrupt for reading the packet/handling errors.
uint16_t irq = lora.getIrqStatus();
uint16_t irq = lora.getIrqFlags();
bool detected = (irq & (RADIOLIB_SX126X_IRQ_HEADER_VALID | RADIOLIB_SX126X_IRQ_PREAMBLE_DETECTED));
// Handle false detections
if (detected) {

Wyświetl plik

@ -25,7 +25,7 @@ template <class T> class SX126xInterface : public RadioLibInterface
/// Prepare hardware for sleep. Call this _only_ for deep sleep, not needed for light sleep.
virtual bool sleep() override;
bool isIRQPending() override { return lora.getIrqStatus() != 0; }
bool isIRQPending() override { return lora.getIrqFlags() != 0; }
protected:
float currentLimit = 140; // Higher OCP limit for SX126x PA

Wyświetl plik

@ -12,6 +12,10 @@
#define SX128X_MAX_POWER 13
#endif
#define RADIOLIB_SX128X_IRQ_RX_DEFAULT \
RADIOLIB_SX128X_IRQ_RX_DONE | RADIOLIB_SX128X_IRQ_RX_TX_TIMEOUT | RADIOLIB_SX128X_IRQ_CRC_ERROR | \
RADIOLIB_SX128X_IRQ_HEADER_ERROR
template <typename T>
SX128xInterface<T>::SX128xInterface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst,
RADIOLIB_PIN_TYPE busy)

Wyświetl plik

@ -27,7 +27,7 @@ template <class T> class SX128xInterface : public RadioLibInterface
/// Prepare hardware for sleep. Call this _only_ for deep sleep, not needed for light sleep.
virtual bool sleep() override;
bool isIRQPending() override { return lora.getIrqStatus() != 0; }
bool isIRQPending() override { return lora.getIrqFlags() != 0; }
protected:
/**