sforkowany z mirror/meshtastic-android
remove deprecated lat/long float encodings
rodzic
9f396c1608
commit
98d5f3a7be
|
@ -42,8 +42,8 @@ data class Position(
|
|||
*/
|
||||
constructor(p: MeshProtos.Position, defaultTime: Int = currentTime()) : this(
|
||||
// We prefer the int version of lat/lon but if not available use the depreciated legacy version
|
||||
if (p.latitudeI == 0) p.latitudeD else degD(p.latitudeI),
|
||||
if (p.longitudeI == 0) p.longitudeD else degD(p.longitudeI),
|
||||
degD(p.latitudeI),
|
||||
degD(p.longitudeI),
|
||||
p.altitude,
|
||||
if (p.time != 0) p.time else defaultTime
|
||||
)
|
||||
|
|
|
@ -1327,9 +1327,6 @@ class MeshService : Service(), Logging {
|
|||
debug("Sending our position to=$destNum lat=$lat, lon=$lon, alt=$alt")
|
||||
|
||||
val position = MeshProtos.Position.newBuilder().also {
|
||||
it.latitudeD = lat // Only old radios will use this variant, others will just ignore it
|
||||
it.longitudeD = lon
|
||||
|
||||
it.longitudeI = Position.degI(lon)
|
||||
it.latitudeI = Position.degI(lat)
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 3ba76bbe4c98ee9c9e422d8dc10844cc9fb5272a
|
||||
Subproject commit b6b1cca5ada3bc22c6b84761846e889315160db3
|
Ładowanie…
Reference in New Issue