From f8cf68e56f7366f9d8487e9f46c8ad32785d17dd Mon Sep 17 00:00:00 2001 From: Garth Vander Houwen Date: Fri, 26 May 2023 21:22:57 -0700 Subject: [PATCH] Try and fix ground speed crash --- Meshtastic/Helpers/BLEManager.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Meshtastic/Helpers/BLEManager.swift b/Meshtastic/Helpers/BLEManager.swift index 8bef3fcc..d28af70e 100644 --- a/Meshtastic/Helpers/BLEManager.swift +++ b/Meshtastic/Helpers/BLEManager.swift @@ -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)