mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Try and fix ground speed crash
This commit is contained in:
parent
c19466daa5
commit
f8cf68e56f
1 changed files with 1 additions and 1 deletions
|
|
@ -785,7 +785,7 @@ class BLEManager: NSObject, CBPeripheralDelegate, ObservableObject {
|
|||
positionPacket.altitude = Int32(LocationHelper.currentAltitude)
|
||||
positionPacket.satsInView = UInt32(LocationHelper.satsInView)
|
||||
if LocationHelper.currentSpeed > 0 && (!LocationHelper.currentSpeed.isNaN || !LocationHelper.currentSpeed.isInfinite) {
|
||||
positionPacket.groundSpeed = UInt32(LocationHelper.currentSpeed * 3.6)
|
||||
positionPacket.groundSpeed = UInt32(UInt64(LocationHelper.currentSpeed * 3.6))
|
||||
}
|
||||
if LocationHelper.currentHeading > 0 && (!LocationHelper.currentHeading.isNaN || !LocationHelper.currentHeading.isInfinite) {
|
||||
positionPacket.groundTrack = UInt32(LocationHelper.currentHeading)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue