From decd8ce527b5ef4a01dd1465b76052374a524ed2 Mon Sep 17 00:00:00 2001 From: TMRh20 Date: Mon, 17 Jun 2024 13:56:11 -0600 Subject: [PATCH] Add call to txStandBy() (#229) - 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")));