move nodeinfo messages into new plugin system

This commit is contained in:
Kevin Hester committed 2020-12-05 10:00:46 +08:00
1 parent f1179bd3ea
commit ae7d3ee5ed
13 files changed
+172 -168

No files matched your search

+11
View File
@@ -12,6 +12,17 @@ bool PositionPlugin::handleReceivedProtobuf(const MeshPacket &mp, const Position
// FIXME - we currently update position data in the DB only if the message was a broadcast or destined to us
// it would be better to update even if the message was destined to others.
DEBUG_MSG("handled incoming position time=%u\n", p.time);
if (p.time) {
struct timeval tv;
uint32_t secs = p.time;
tv.tv_sec = secs;
tv.tv_usec = 0;
perhapsSetRTC(RTCQualityFromNet, &tv);
}
nodeDB.updatePosition(mp.from, p);
return false; // Let others look at this message also if they want