mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-29 05:36:39 +00:00
Merge branch 'development' into prerelease-14.0.0
This commit is contained in:
commit
4111b7883b
@ -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);
|
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;
|
static bool _locked = false;
|
||||||
if (_locked) { return; }
|
if (_locked) { return; }
|
||||||
|
|
||||||
_locked = true;
|
_locked = true;
|
||||||
|
|
||||||
|
uint8_t *MAC = esp_now_info->src_addr;
|
||||||
|
|
||||||
char _srcMAC[18];
|
char _srcMAC[18];
|
||||||
ToHex_P(MAC, 6, _srcMAC, 18, ':');
|
ToHex_P(MAC, 6, _srcMAC, 18, ':');
|
||||||
AddLog(LOG_LEVEL_DEBUG, PSTR("MSH: Rcvd from %s"), _srcMAC);
|
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);
|
// AddLog(LOG_LEVEL_INFO, PSTR("MSH: %*_H), MESH.packetToConsume.front().chunkSize, (uint8_t *)&MESH.packetToConsume.front().payload);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
#ifdef USE_TASMESH_HEARTBEAT
|
||||||
case PACKET_TYPE_HEARTBEAT:
|
case PACKET_TYPE_HEARTBEAT:
|
||||||
break;
|
break;
|
||||||
|
#endif // USE_TASMESH_HEARTBEAT
|
||||||
|
|
||||||
default:
|
default:
|
||||||
AddLogBuffer(LOG_LEVEL_DEBUG, (uint8_t *)&MESH.packetToConsume.front(), MESH.packetToConsume.front().chunkSize +5);
|
AddLogBuffer(LOG_LEVEL_DEBUG, (uint8_t *)&MESH.packetToConsume.front(), MESH.packetToConsume.front().chunkSize +5);
|
||||||
|
@ -31,6 +31,10 @@
|
|||||||
#define XSNS_29 29
|
#define XSNS_29 29
|
||||||
#define XI2C_22 22 // See I2CDEVICES.md
|
#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
|
Default register locations for MCP23008 - They change for MCP23017 in default bank mode
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user