Skip to content

Commit a9cf4b4

Browse files
change(ESP_NOW_Serial): No teardown on retry limit
After max retries is met once the ESP_NOW_Serial_Class performs "end()". This removes the peer from ESP_NOW. Further messages to and from ESP_NOW_Serial are not received or sent. 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.
1 parent e70f4d3 commit a9cf4b4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Diff for: libraries/ESP_NOW/src/ESP32_NOW_Serial.cpp

+3-2
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)