Skip to content

Commit

Permalink
fix(espnow_sender): add debug in espnow callback
Browse files Browse the repository at this point in the history
  • Loading branch information
MisaelK authored Sep 28, 2024
1 parent 87a1e41 commit bb76737
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions esp32_espnow/espnow_sender/espnow_sender.ino
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,9 @@ void loop() {

// callback when data is sent
void OnDataSent(const uint8_t *mac_addr, esp_now_send_status_t status) {
Serial.println(status == ESP_NOW_SEND_SUCCESS ? "OK" : "FAIL");
Serial.print(micros() - timestamp);
Serial.println("ms");
if (DEBUG) {
Serial.println(status == ESP_NOW_SEND_SUCCESS ? "OK" : "FAIL");
Serial.print(micros() - timestamp);
Serial.println("ms");
}
}

0 comments on commit bb76737

Please sign in to comment.