From 3e8ca44681088f81e7af42dd6b4349490050554d Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Fri, 10 May 2024 10:34:58 +0200 Subject: [PATCH] Attempt to fix TasMesh (#21395) --- tasmota/tasmota_xdrv_driver/xdrv_57_9_tasmesh.ino | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tasmota/tasmota_xdrv_driver/xdrv_57_9_tasmesh.ino b/tasmota/tasmota_xdrv_driver/xdrv_57_9_tasmesh.ino index 8f1e7fe6f..e3b111229 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_57_9_tasmesh.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_57_9_tasmesh.ino @@ -51,11 +51,16 @@ void CB_MESHDataSent(const uint8_t *MAC, esp_now_send_status_t sendStatus) { AddLog(LOG_LEVEL_DEBUG, PSTR("MSH: Sent to %s status %d"), _destMAC, sendStatus); } -void CB_MESHDataReceived(const uint8_t *MAC, const uint8_t *packet, int len) { +//void CB_MESHDataReceived(const uint8_t *MAC, const uint8_t *packet, int len) { +void CB_MESHDataReceived(const esp_now_recv_info_t *esp_now_info, const uint8_t *packet, int len); +void CB_MESHDataReceived(const esp_now_recv_info_t *esp_now_info, const uint8_t *packet, int len) { static bool _locked = false; if (_locked) { return; } _locked = true; + + uint8_t *MAC = esp_now_info->src_addr; + char _srcMAC[18]; ToHex_P(MAC, 6, _srcMAC, 18, ':'); AddLog(LOG_LEVEL_DEBUG, PSTR("MSH: Rcvd from %s"), _srcMAC);