mirror of
https://github.com/meshtastic/firmware.git
synced 2025-04-29 02:51:17 +00:00
discriminate local/remote node position updates (#889)
This commit is contained in:
parent
992bbe76d7
commit
d0fb363422
@ -236,7 +236,7 @@ int MeshService::onGPSChanged(const meshtastic::GPSStatus *unused)
|
|||||||
DEBUG_MSG("got gps notify time=%u, lat=%d, bat=%d\n", pos.time, pos.latitude_i, pos.battery_level);
|
DEBUG_MSG("got gps notify time=%u, lat=%d, bat=%d\n", pos.time, pos.latitude_i, pos.battery_level);
|
||||||
|
|
||||||
// Update our current position in the local DB
|
// Update our current position in the local DB
|
||||||
nodeDB.updatePosition(nodeDB.getNodeNum(), pos);
|
nodeDB.updatePosition(nodeDB.getNodeNum(), pos, RX_SRC_LOCAL);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -447,7 +447,7 @@ size_t NodeDB::getNumOnlineNodes()
|
|||||||
|
|
||||||
/** Update position info for this node based on received position data
|
/** Update position info for this node based on received position data
|
||||||
*/
|
*/
|
||||||
void NodeDB::updatePosition(uint32_t nodeId, const Position &p)
|
void NodeDB::updatePosition(uint32_t nodeId, const Position &p, RxSource src)
|
||||||
{
|
{
|
||||||
NodeInfo *info = getOrCreateNode(nodeId);
|
NodeInfo *info = getOrCreateNode(nodeId);
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ class NodeDB
|
|||||||
|
|
||||||
/** Update position info for this node based on received position data
|
/** Update position info for this node based on received position data
|
||||||
*/
|
*/
|
||||||
void updatePosition(uint32_t nodeId, const Position &p);
|
void updatePosition(uint32_t nodeId, const Position &p, RxSource src = RX_SRC_RADIO);
|
||||||
|
|
||||||
/** Update user info for this node based on received user data
|
/** Update user info for this node based on received user data
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user