mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
* ESPNOW: packet rx/tx counters
This commit is contained in:
parent
00f0bb7471
commit
e1092118d9
1 changed files with 2 additions and 0 deletions
|
|
@ -72,6 +72,7 @@ void ESPNOWRadio::startSendRaw(const uint8_t* bytes, int len) {
|
|||
is_send_complete = false;
|
||||
esp_err_t result = esp_now_send(broadcastAddress, bytes, len);
|
||||
if (result == ESP_OK) {
|
||||
n_sent++;
|
||||
ESPNOW_DEBUG_PRINTLN("Send success");
|
||||
} else {
|
||||
last_send_result = result;
|
||||
|
|
@ -94,6 +95,7 @@ int ESPNOWRadio::recvRaw(uint8_t* bytes, int sz) {
|
|||
if (last_rx_len > 0) {
|
||||
memcpy(bytes, rx_buf, last_rx_len);
|
||||
last_rx_len = 0;
|
||||
n_recv++;
|
||||
}
|
||||
return len;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue