From f77c5fe7fae65344106727fa24a4890b75d57473 Mon Sep 17 00:00:00 2001 From: TMRh20 Date: Mon, 17 Jun 2024 06:14:39 -0600 Subject: [PATCH] Add call to txStandBy() - If a write fails while auto-ack is enabled using `writeFast()` there is a need to call txStandBy() or subsequent writes will fail. It also allows extra time for the current write to succeed. --- RF24Network.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/RF24Network.cpp b/RF24Network.cpp index 42b549c5..0d51abf8 100644 --- a/RF24Network.cpp +++ b/RF24Network.cpp @@ -1001,7 +1001,9 @@ bool ESBNetwork::write_to_pipe(uint16_t node, uint8_t pipe, bool multic ok = radio.txStandBy(txTimeout); radio.setAutoAck(0, 0); } - + else if (!ok) { + ok = radio.txStandBy(txTimeout); + } /* #if defined (__arm__) || defined (RF24_LINUX) IF_RF24NETWORK_DEBUG(printf_P(PSTR("%u: MAC Sent on %x %s\n\r"), millis(), (uint32_t)out_pipe, ok ? PSTR("ok") : PSTR("failed")));