Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 76d7cac

Browse files
authoredSep 4, 2024··
Do not teardown for missed message to peer.
After max retries is met once the ESP_NOW_Serial_Class performs "end()" which removes the peer from ESP_NOW. Further messages to and from ESP_NOW_Serial are discarded or ignored. Peer should stay in ESP_NOW to re-establish connection even with data loss. This change will retry and drop the data piece by piece instead of aborting the connection. physically
1 parent e70f4d3 commit 76d7cac

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed
 

‎libraries/ESP_NOW/src/ESP32_NOW_Serial.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,9 +264,10 @@ void ESP_NOW_Serial_Class::onSent(bool success) {
264264
//the data is lost in this case
265265
vRingbufferReturnItem(tx_ring_buf, queued_buff);
266266
queued_buff = NULL;
267-
xSemaphoreGive(tx_sem);
268-
end();
269267
log_e(MACSTR " : RE-SEND_MAX[%u]", MAC2STR(addr()), resend_count);
268+
//send next packet?
269+
//log_d(MACSTR ": NEXT", MAC2STR(addr()));
270+
checkForTxData();
270271
}
271272
}
272273
}

0 commit comments

Comments
 (0)
Please sign in to comment.