* ESPNOW: packet rx/tx counters

This commit is contained in:
Scott Powell 2025-04-24 12:16:55 +10:00
parent 00f0bb7471
commit e1092118d9

View file

@ -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;
}