lib update: mesh detector

This commit is contained in:
mverch67 2024-09-04 18:57:39 +02:00
parent ef635da94e
commit c4e0989440
2 changed files with 10 additions and 2 deletions

@ -1 +1 @@
Subproject commit a6a981cb8120588324c562994d3c378aad39eedb
Subproject commit 43758a65cd45343432e1dba59510b2d1bc0d5180

View File

@ -4,6 +4,7 @@
#include "MeshService.h"
#include "PowerFSM.h"
#include "RadioInterface.h"
#include "modules/NodeInfoModule.h"
PacketAPI *packetAPI = nullptr;
@ -54,7 +55,14 @@ bool PacketAPI::receivePacket(void)
break;
}
case meshtastic_ToRadio_heartbeat_tag:
LOG_DEBUG("Got client heartbeat\n");
if (mr->heartbeat.dummy_field == 1) {
if (nodeInfoModule) {
LOG_INFO("Broadcasting nodeinfo ping\n");
nodeInfoModule->sendOurNodeInfo(NODENUM_BROADCAST, true, 0, true);
}
} else {
LOG_DEBUG("Got client heartbeat\n");
}
break;
default:
LOG_ERROR("Error: unhandled meshtastic_ToRadio variant: %d\n", mr->which_payload_variant);