mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-05-18 19:56:34 -04:00
fix: getMslAltitudeMeters call when MSL altitude is not available
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user