Skip to content

Commit bd444c3

Browse files
committed
fix(esp-now): Update TX Callback
1 parent b840be4 commit bd444c3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

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

+5
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,12 @@ static void _esp_now_rx_cb(const esp_now_recv_info_t *info, const uint8_t *data,
129129
}
130130
}
131131

132+
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 5, 0)
133+
static void _esp_now_tx_cb(const esp_now_send_info_t *tx_info, esp_now_send_status_t status) {
134+
const uint8_t *mac_addr = tx_info->des_addr;
135+
#else
132136
static void _esp_now_tx_cb(const uint8_t *mac_addr, esp_now_send_status_t status) {
137+
#endif
133138
log_v(MACSTR " : %s", MAC2STR(mac_addr), (status == ESP_NOW_SEND_SUCCESS) ? "SUCCESS" : "FAILED");
134139
//find the peer and call it's callback
135140
for (uint8_t i = 0; i < ESP_NOW_MAX_TOTAL_PEER_NUM; i++) {

0 commit comments

Comments
 (0)