WIP phone api changes for dev1.2

This commit is contained in:
Kevin Hester committed 2021-02-17 19:04:41 +08:00
1 parent 60a01567d9
commit 69a11e7375
18 files changed
+82 -63

No files matched your search

+3 -3
View File
@@ -10,15 +10,15 @@ PositionPlugin *positionPlugin;
PositionPlugin::PositionPlugin()
: ProtobufPlugin("position", PortNum_POSITION_APP, Position_fields), concurrency::OSThread("PositionPlugin")
{
isPromiscuous = true; // We always want to update our nodedb, even if we are sniffing on others
setIntervalFromNow(60 *
1000); // Send our initial position 60 seconds after we start (to give GPS time to setup)
}
bool PositionPlugin::handleReceivedProtobuf(const MeshPacket &mp, const Position &p)
bool PositionPlugin::handleReceivedProtobuf(const MeshPacket &mp, const Position *pptr)
{
// 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.
auto p = *pptr;
if (p.time) {
struct timeval tv;