mirror of
https://github.com/meshtastic/firmware.git
synced 2025-09-21 01:04:01 +00:00
lib update: mesh detector
This commit is contained in:
parent
6ecef3a57b
commit
089442edac
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user