lib update: mesh detector

This commit is contained in:
mverch67 2024-09-04 18:57:39 +02:00 committed by Tom Fifield
parent 6ecef3a57b
commit 089442edac

View File

@ -4,6 +4,7 @@
#include "MeshService.h" #include "MeshService.h"
#include "PowerFSM.h" #include "PowerFSM.h"
#include "RadioInterface.h" #include "RadioInterface.h"
#include "modules/NodeInfoModule.h"
PacketAPI *packetAPI = nullptr; PacketAPI *packetAPI = nullptr;
@ -54,7 +55,14 @@ bool PacketAPI::receivePacket(void)
break; break;
} }
case meshtastic_ToRadio_heartbeat_tag: 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; break;
default: default:
LOG_ERROR("Error: unhandled meshtastic_ToRadio variant: %d\n", mr->which_payload_variant); LOG_ERROR("Error: unhandled meshtastic_ToRadio variant: %d\n", mr->which_payload_variant);