kopia lustrzana https://github.com/meshtastic/Meshtastic-Android
fix: position packet `want_response` handling
Process valid position broadcasts with `want_response` true except from position requests with an empty payload (latitude and longitude are zeroes).pull/1110/head
rodzic
eacf3a87a0
commit
af56fff216
|
@ -678,11 +678,14 @@ class MeshService : Service(), Logging {
|
|||
|
||||
// Handle new style position info
|
||||
Portnums.PortNum.POSITION_APP_VALUE -> {
|
||||
if (data.wantResponse) return // ignore data from position requests
|
||||
val u = MeshProtos.Position.parseFrom(data.payload)
|
||||
// debug("position_app ${packet.from} ${u.toOneLineString()}")
|
||||
if (data.wantResponse && u.latitudeI == 0 && u.longitudeI == 0) {
|
||||
debug("Ignoring nop position update from position request")
|
||||
} else {
|
||||
handleReceivedPosition(packet.from, u, dataPacket.time)
|
||||
}
|
||||
}
|
||||
|
||||
// Handle new style user info
|
||||
Portnums.PortNum.NODEINFO_APP_VALUE ->
|
||||
|
|
Ładowanie…
Reference in New Issue