sforkowany z mirror/meshtastic-firmware
commit
093e3e55b9
|
@ -457,10 +457,19 @@ void NodeDB::updatePosition(uint32_t nodeId, const Position &p, RxSource src)
|
||||||
p.pos_timestamp, p.time, p.latitude_i, p.longitude_i);
|
p.pos_timestamp, p.time, p.latitude_i, p.longitude_i);
|
||||||
info->position = p;
|
info->position = p;
|
||||||
|
|
||||||
|
} else if ((p.time > 0) && !p.latitude_i && !p.longitude_i && !p.pos_timestamp &&
|
||||||
|
!p.location_source) {
|
||||||
|
// FIXME SPECIAL TIME SETTING PACKET FROM EUD TO RADIO
|
||||||
|
// (stop-gap fix for issue #900)
|
||||||
|
DEBUG_MSG("updatePosition SPECIAL time setting time=%u\n", p.time);
|
||||||
|
info->position.time = p.time;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// Be careful to only update fields that have been set by the REMOTE sender
|
// Be careful to only update fields that have been set by the REMOTE sender
|
||||||
// A lot of position reports don't have time populated. In that case, be careful to not blow away the time we
|
// A lot of position reports don't have time populated. In that case, be careful to not blow away the time we
|
||||||
// recorded based on the packet rxTime
|
// recorded based on the packet rxTime
|
||||||
|
//
|
||||||
|
// FIXME perhaps handle RX_SRC_USER separately?
|
||||||
DEBUG_MSG("updatePosition REMOTE node=0x%x time=%u, latI=%d, lonI=%d\n",
|
DEBUG_MSG("updatePosition REMOTE node=0x%x time=%u, latI=%d, lonI=%d\n",
|
||||||
nodeId, p.time, p.latitude_i, p.longitude_i);
|
nodeId, p.time, p.latitude_i, p.longitude_i);
|
||||||
|
|
||||||
|
|
|
@ -334,9 +334,11 @@ void Router::handleReceived(MeshPacket *p, RxSource src)
|
||||||
if (decoded) {
|
if (decoded) {
|
||||||
// parsing was successful, queue for our recipient
|
// parsing was successful, queue for our recipient
|
||||||
if (src == RX_SRC_LOCAL)
|
if (src == RX_SRC_LOCAL)
|
||||||
printPacket("handleReceived(local)", p);
|
printPacket("handleReceived(LOCAL)", p);
|
||||||
|
else if (src == RX_SRC_USER)
|
||||||
|
printPacket("handleReceived(USER)", p);
|
||||||
else
|
else
|
||||||
printPacket("handleReceived(remote)", p);
|
printPacket("handleReceived(REMOTE)", p);
|
||||||
} else {
|
} else {
|
||||||
printPacket("packet decoding failed (no PSK?)", p);
|
printPacket("packet decoding failed (no PSK?)", p);
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,11 +18,15 @@ bool PositionPlugin::handleReceivedProtobuf(const MeshPacket &mp, Position *pptr
|
||||||
{
|
{
|
||||||
auto p = *pptr;
|
auto p = *pptr;
|
||||||
|
|
||||||
// If inbound message is a replay (or spoof!) of our own messages, do not process
|
// If inbound message is a replay (or spoof!) of our own messages, we shouldn't process
|
||||||
// (why use second-hand sources for our own data?)
|
// (why use second-hand sources for our own data?)
|
||||||
|
|
||||||
|
// FIXME this can in fact happen with packets sent from EUD (src=RX_SRC_USER)
|
||||||
|
// to set fixed location, EUD-GPS location or just the time (see also issue #900)
|
||||||
if (nodeDB.getNodeNum() == getFrom(&mp)) {
|
if (nodeDB.getNodeNum() == getFrom(&mp)) {
|
||||||
DEBUG_MSG("Ignored an incoming update from MYSELF\n");
|
DEBUG_MSG("Incoming update from MYSELF\n");
|
||||||
return false;
|
// DEBUG_MSG("Ignored an incoming update from MYSELF\n");
|
||||||
|
// return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Log packet size and list of fields
|
// Log packet size and list of fields
|
||||||
|
|
Ładowanie…
Reference in New Issue