mirror of
https://github.com/meshtastic/firmware.git
synced 2025-09-21 09:13:42 +00:00
added heartbeat
This commit is contained in:
parent
548b57c2e2
commit
6d945e06c1
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
#include "api/PacketAPI.h"
|
#include "api/PacketAPI.h"
|
||||||
#include "MeshService.h"
|
#include "MeshService.h"
|
||||||
|
#include "PowerFSM.h"
|
||||||
#include "RadioInterface.h"
|
#include "RadioInterface.h"
|
||||||
|
|
||||||
PacketAPI *packetAPI = nullptr;
|
PacketAPI *packetAPI = nullptr;
|
||||||
@ -30,6 +31,9 @@ bool PacketAPI::receivePacket(void)
|
|||||||
isConnected = true;
|
isConnected = true;
|
||||||
data_received = true;
|
data_received = true;
|
||||||
|
|
||||||
|
powerFSM.trigger(EVENT_CONTACT_FROM_PHONE);
|
||||||
|
lastContactMsec = millis();
|
||||||
|
|
||||||
meshtastic_ToRadio *mr;
|
meshtastic_ToRadio *mr;
|
||||||
auto p = server->receivePacket()->move();
|
auto p = server->receivePacket()->move();
|
||||||
int id = p->getPacketId();
|
int id = p->getPacketId();
|
||||||
@ -49,6 +53,9 @@ bool PacketAPI::receivePacket(void)
|
|||||||
handleStartConfig();
|
handleStartConfig();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case meshtastic_ToRadio_heartbeat_tag:
|
||||||
|
LOG_DEBUG("Got client heartbeat\n");
|
||||||
|
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);
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user