From 7f29c70461b7eb2db2197d09700c436b8c79f411 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 c1d35a58..17dbb519 100644 --- a/RF24Network.cpp +++ b/RF24Network.cpp @@ -979,7 +979,9 @@ bool RF24Network::write_to_pipe(uint16_t node, uint8_t pipe, bool multicast) 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")));