diff --git a/tasmota/tasmota_xdrv_driver/xdrv_57_9_tasmesh.ino b/tasmota/tasmota_xdrv_driver/xdrv_57_9_tasmesh.ino index 262355e13..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); @@ -562,8 +567,10 @@ void MESHevery50MSecond(void) { // AddLog(LOG_LEVEL_INFO, PSTR("MSH: %*_H), MESH.packetToConsume.front().chunkSize, (uint8_t *)&MESH.packetToConsume.front().payload); } break; +#ifdef USE_TASMESH_HEARTBEAT case PACKET_TYPE_HEARTBEAT: break; +#endif // USE_TASMESH_HEARTBEAT default: AddLogBuffer(LOG_LEVEL_DEBUG, (uint8_t *)&MESH.packetToConsume.front(), MESH.packetToConsume.front().chunkSize +5); diff --git a/tasmota/tasmota_xsns_sensor/xsns_29_mcp230xx.ino b/tasmota/tasmota_xsns_sensor/xsns_29_mcp230xx.ino index 29a25c182..66c1a982a 100644 --- a/tasmota/tasmota_xsns_sensor/xsns_29_mcp230xx.ino +++ b/tasmota/tasmota_xsns_sensor/xsns_29_mcp230xx.ino @@ -31,6 +31,10 @@ #define XSNS_29 29 #define XI2C_22 22 // See I2CDEVICES.md +#ifndef USE_MCP230xx_ADDR +#define USE_MCP230xx_ADDR 0x20 // Enable MCP23008/MCP23017 I2C Address to use (Must be within range 0x20 through 0x27 - set according to your wired setup) +#endif + /* Default register locations for MCP23008 - They change for MCP23017 in default bank mode */