kopia lustrzana https://github.com/meshtastic/Meshtastic-Android
don't (incorrectly) set want_replies
rodzic
b4b1099e76
commit
acd43b29f5
|
@ -37,9 +37,13 @@ class MeshServiceLocationCallback(
|
||||||
locationResult.lastLocationOrBestEffort()?.let { location ->
|
locationResult.lastLocationOrBestEffort()?.let { location ->
|
||||||
MeshService.info("got phone location")
|
MeshService.info("got phone location")
|
||||||
if (location.isAccurateForMesh) { // if within 200 meters, or accuracy is unknown
|
if (location.isAccurateForMesh) { // if within 200 meters, or accuracy is unknown
|
||||||
val shouldSend = isAllowedToSend()
|
|
||||||
val destinationNumber = if (shouldSend) DataPacket.NODENUM_BROADCAST else getNodeNum()
|
// Do we want to broadcast this position globally, or are we just telling the local node what its current position is (
|
||||||
sendPosition(location, destinationNumber, wantResponse = shouldSend)
|
val shouldBroadcast = isAllowedToSend()
|
||||||
|
val destinationNumber = if (shouldBroadcast) DataPacket.NODENUM_BROADCAST else getNodeNum()
|
||||||
|
|
||||||
|
// Note: we never want this message sent as a reliable message, because it is low value and we'll be sending one again later anyways
|
||||||
|
sendPosition(location, destinationNumber, wantResponse = false)
|
||||||
} else {
|
} else {
|
||||||
MeshService.warn("accuracy ${location.accuracy} is too poor to use")
|
MeshService.warn("accuracy ${location.accuracy} is too poor to use")
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue