Skip to content

Commit 03e9c45

Browse files
me-no-devJason2866
andauthored
IDF master (#11204)
* fix(esp-now): Update TX Callback * IDF master d930a386 --------- Co-authored-by: Jason2866 <[email protected]>
1 parent 5d0c4b3 commit 03e9c45

File tree

2 files changed

+107
-102
lines changed

2 files changed

+107
-102
lines changed

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)