[SX127x] Added default startReceive arguments

This commit is contained in:
jgromes 2024-08-28 19:26:26 +02:00
parent 26aae8da8d
commit 0e694f3985
2 changed files with 4 additions and 4 deletions

View file

@ -168,9 +168,9 @@ void loop() {
// check if we got a preamble
if(detectedFlag) {
// LoRa preamble was detected
// LoRa preamble was detected, start reception with timeout of 100 LoRa symbols
Serial.print(F("[SX1278] Preamble detected, starting reception ... "));
state = radio.startReceive(0, RADIOLIB_SX127X_RXSINGLE);
state = radio.startReceive(100);
if (state == RADIOLIB_ERR_NONE) {
Serial.println(F("success!"));
} else {

View file

@ -811,7 +811,7 @@ class SX127x: public PhysicalLayer {
\returns \ref status_codes
*/
int16_t startReceive() override;
/*!
\brief Interrupt-driven receive method, implemented for compatibility with PhysicalLayer.
\param timeout Receive mode type and/or raw timeout value in symbols.
@ -823,7 +823,7 @@ class SX127x: public PhysicalLayer {
\param len Expected length of packet to be received. Required for LoRa spreading factor 6.
\returns \ref status_codes
*/
int16_t startReceive(uint32_t timeout, RadioLibIrqFlags_t irqFlags, RadioLibIrqFlags_t irqMask, size_t len) override;
int16_t startReceive(uint32_t timeout, RadioLibIrqFlags_t irqFlags = RADIOLIB_IRQ_RX_DEFAULT_FLAGS, RadioLibIrqFlags_t irqMask = RADIOLIB_IRQ_RX_DEFAULT_MASK, size_t len = 0) override;
/*!
\brief Reads data that was received after calling startReceive method. When the packet length is not known in advance,