Merge pull request #236 from vfurman-gh/map_update

Map UI update fixes
This commit is contained in:
Kevin Hester 2021-02-08 11:30:31 +08:00 committed by GitHub
commit 2cd2801200
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 42 additions and 40 deletions

View file

@ -613,9 +613,14 @@ class MeshService : Service(), Logging {
if (dataPacket != null) {
if (myInfo.myNodeNum == packet.from)
debug("Ignoring packet sent from our node")
else {
if (myInfo.myNodeNum == packet.from) {
// Handle position updates from the device
if (data.portnumValue == Portnums.PortNum.POSITION_APP_VALUE) {
val rxTime = if (packet.rxTime != 0) packet.rxTime else currentSecond()
handleReceivedPosition(packet.from, MeshProtos.Position.parseFrom(data.payload), rxTime)
} else
debug("Ignoring packet sent from our node, portnum=${data.portnumValue} ${bytes.size} bytes")
} else {
debug("Received data from $fromId, portnum=${data.portnumValue} ${bytes.size} bytes")
dataPacket.status = MessageStatus.RECEIVED