diff --git a/Meshtastic.xcodeproj/project.pbxproj b/Meshtastic.xcodeproj/project.pbxproj index e3ff05c8..c2d1d4b9 100644 --- a/Meshtastic.xcodeproj/project.pbxproj +++ b/Meshtastic.xcodeproj/project.pbxproj @@ -1486,7 +1486,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 2.2.16; + MARKETING_VERSION = 2.2.17; PRODUCT_BUNDLE_IDENTIFIER = gvh.MeshtasticClient; PRODUCT_NAME = "$(TARGET_NAME)"; SUPPORTS_MACCATALYST = YES; @@ -1520,7 +1520,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 2.2.16; + MARKETING_VERSION = 2.2.17; PRODUCT_BUNDLE_IDENTIFIER = gvh.MeshtasticClient; PRODUCT_NAME = "$(TARGET_NAME)"; SUPPORTS_MACCATALYST = YES; @@ -1642,7 +1642,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 2.2.16; + MARKETING_VERSION = 2.2.17; PRODUCT_BUNDLE_IDENTIFIER = gvh.MeshtasticClient.Widgets; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -1675,7 +1675,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 2.2.16; + MARKETING_VERSION = 2.2.17; PRODUCT_BUNDLE_IDENTIFIER = gvh.MeshtasticClient.Widgets; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; diff --git a/Meshtastic/Helpers/LocationsHandler.swift b/Meshtastic/Helpers/LocationsHandler.swift index d214f5ee..3d8cf278 100644 --- a/Meshtastic/Helpers/LocationsHandler.swift +++ b/Meshtastic/Helpers/LocationsHandler.swift @@ -54,7 +54,6 @@ import CoreLocation for try await update in updates { if !self.updatesStarted { break } // End location updates by breaking out of the loop. if let loc = update.location { - self.lastLocation = loc self.isStationary = update.isStationary self.count += 1 var locationAdded: Bool @@ -62,6 +61,7 @@ import CoreLocation locationAdded = addLocation(loc) } else { locationsArray.append(loc) + self.lastLocation = loc locationAdded = true } if !locationAdded { @@ -96,6 +96,7 @@ import CoreLocation return false } locationsArray.append(location) + lastLocation = location return true } diff --git a/Meshtastic/MeshtasticAppDelegate.swift b/Meshtastic/MeshtasticAppDelegate.swift index df9fe7ac..ab108787 100644 --- a/Meshtastic/MeshtasticAppDelegate.swift +++ b/Meshtastic/MeshtasticAppDelegate.swift @@ -18,11 +18,8 @@ class MeshtasticAppDelegate: NSObject, UIApplicationDelegate, UNUserNotification UNUserNotificationCenter.current().delegate = self if #available(iOS 17.0, macOS 14.0, *) { let locationsHandler = LocationsHandler.shared - - // If location updates were previously active, restart them after the background launch. - if locationsHandler.updatesStarted { - locationsHandler.startLocationUpdates() - } + locationsHandler.startLocationUpdates() + // If a background activity session was previously active, reinstantiate it after the background launch. if locationsHandler.backgroundActivity { locationsHandler.backgroundActivity = true diff --git a/Meshtastic/Views/Nodes/PositionLog.swift b/Meshtastic/Views/Nodes/PositionLog.swift index d8d0e5e0..33d2d92d 100644 --- a/Meshtastic/Views/Nodes/PositionLog.swift +++ b/Meshtastic/Views/Nodes/PositionLog.swift @@ -50,7 +50,8 @@ struct PositionLog: View { Text(speed.formatted()) } TableColumn("Heading") { position in - let heading = Measurement(value: Double(position.heading), unit: UnitAngle.degrees) + let degrees = Angle.degrees(Double(position.heading)) + let heading = Measurement(value: degrees.degrees, unit: UnitAngle.degrees) Text("\(heading.formatted())") } TableColumn("SNR") { position in