kopia lustrzana https://github.com/meshtastic/Meshtastic-Android
fix: `getMslAltitudeMeters` call when MSL altitude is not available
rodzic
d4f4e4f14a
commit
e5396524fb
|
@ -181,7 +181,9 @@ class MeshService : Service(), Logging {
|
|||
position {
|
||||
latitudeI = Position.degI(location.latitude)
|
||||
longitudeI = Position.degI(location.longitude)
|
||||
altitude = LocationCompat.getMslAltitudeMeters(location).toInt()
|
||||
if (LocationCompat.hasMslAltitude(location)) {
|
||||
altitude = LocationCompat.getMslAltitudeMeters(location).toInt()
|
||||
}
|
||||
altitudeHae = location.altitude.toInt()
|
||||
time = (location.time / 1000).toInt()
|
||||
groundSpeed = location.speed.toInt()
|
||||
|
|
Ładowanie…
Reference in New Issue