mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-18 08:42:37 +00:00
WIP phone api changes for dev1.2
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user