From fe9ca4951771c8ab9080ee1c8a1401202b4a68c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Lair?= Date: Thu, 29 Jun 2023 12:21:42 +0200 Subject: [PATCH] v7.7.0 --- .../OpenFlight.xcodeproj/project.pbxproj | 68 ++++---- .../Providers/TouchAndFlyMission.swift | 8 +- .../SettingValuesChoiceTableViewCell.swift | 3 +- .../ProjectManagerViewController.swift | 1 + .../Gallery/ViewModels/GalleryViewModel.swift | 1 + .../Cells/Advanced/SettingsGeoFenceCell.swift | 23 ++- .../Cells/Advanced/SettingsSliderCell.swift | 73 ++++++++- .../Models/SliderHighlightedRange.swift | 42 +++++ .../ViewModels/QuickSettingsViewModel.swift | 2 +- .../SettingsGeofenceViewModel.swift | 154 +++++++++++------- .../Resources/Generated/Strings.swift | 4 +- .../Generated/de.lproj/Localizable.strings | 3 +- .../Generated/en.lproj/Localizable.strings | 3 +- .../Generated/es.lproj/Localizable.strings | 3 +- .../Generated/fr.lproj/Localizable.strings | 3 +- .../Generated/ja.lproj/Localizable.strings | 3 +- .../OpenFlight/Services/AlertsMonitor.swift | 2 +- .../Drone/CurrentDroneHolder.swift | 6 +- .../Drone/OphtalmoService.swift | 5 +- .../CommonServices/Drone/RthService.swift | 2 +- .../Swiftgen/Generated/Strings.swift | 4 +- .../Generated/de.lproj/Localizable.strings | 3 +- .../Generated/en.lproj/Localizable.strings | 3 +- .../Generated/es.lproj/Localizable.strings | 3 +- .../Generated/fr.lproj/Localizable.strings | 3 +- .../Generated/ja.lproj/Localizable.strings | 3 +- OpenFlight/OpenFlight/Swiftgen/strings.csv | 3 +- OpenFlight/Podfile | 18 +- OpenFlight/config.xcconfig | 2 +- 29 files changed, 312 insertions(+), 139 deletions(-) create mode 100644 OpenFlight/OpenFlight/Modules/Settings/Models/SliderHighlightedRange.swift diff --git a/OpenFlight/OpenFlight.xcodeproj/project.pbxproj b/OpenFlight/OpenFlight.xcodeproj/project.pbxproj index ab539ceb..7bef3e82 100644 --- a/OpenFlight/OpenFlight.xcodeproj/project.pbxproj +++ b/OpenFlight/OpenFlight.xcodeproj/project.pbxproj @@ -242,6 +242,7 @@ 58D7676429F7DAD800130D7F /* SettingsGeoFenceCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58D7676329F7DAD800130D7F /* SettingsGeoFenceCell.swift */; }; 58D7676729F9633B00130D7F /* SliderSetting.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58D7676629F9633B00130D7F /* SliderSetting.swift */; }; 58D7676A29FA7DCC00130D7F /* SettingsCellType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58D7676929FA7DCC00130D7F /* SettingsCellType.swift */; }; + 58EC8B832A40ADEB00EC1B80 /* SliderHighlightedRange.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58EC8B822A40ADEB00EC1B80 /* SliderHighlightedRange.swift */; }; 680B6F5E26F3526700916471 /* EditionSettingsCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D740F7B26EBB83500A456FE /* EditionSettingsCoordinator.swift */; }; 6835F78C270F1F41008E8B51 /* MapElevationSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6835F78A270F1F2A008E8B51 /* MapElevationSource.swift */; }; 6835F78E270F9769008E8B51 /* DashboardSettingsCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 220A103B270B3C3E00966BD5 /* DashboardSettingsCell.swift */; }; @@ -252,6 +253,11 @@ 6856802C27F761AA00FDFE6E /* DriSetting.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3E9F718527EC701F00029C6D /* DriSetting.swift */; }; 6856802D27F76FE300FDFE6E /* DriTypeConfig+Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3EA27FA927F251C1007F7904 /* DriTypeConfig+Utils.swift */; }; 685F839A26CD4500005A6AE1 /* TopBarViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43B7337F26CCEEB1002654BF /* TopBarViewModel.swift */; }; + 6863615B2A4D765D00298BAA /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 686361512A4D765C00298BAA /* Localizable.strings */; }; + 6863615D2A4D765D00298BAA /* Strings.swift in Sources */ = {isa = PBXBuildFile; fileRef = 686361532A4D765C00298BAA /* Strings.swift */; }; + 6863615F2A4D765D00298BAA /* Storyboards.swift in Sources */ = {isa = PBXBuildFile; fileRef = 686361572A4D765C00298BAA /* Storyboards.swift */; }; + 686361612A4D765D00298BAA /* Images.swift in Sources */ = {isa = PBXBuildFile; fileRef = 686361582A4D765C00298BAA /* Images.swift */; }; + 686361632A4D765D00298BAA /* Colors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6863615A2A4D765C00298BAA /* Colors.swift */; }; 6879038326691FD6006DA545 /* CurrentMissionManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 439771DF2666657500B4EFA4 /* CurrentMissionManager.swift */; }; 687963AC26E129AD00033707 /* FlightPlanOriginGraphic.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9BE9FB1F26D78FD3009CD109 /* FlightPlanOriginGraphic.swift */; }; 687963B326E74E9700033707 /* Camera2Editor+Helpers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 687963AF26E7495900033707 /* Camera2Editor+Helpers.swift */; }; @@ -262,11 +268,6 @@ 688D7468282E8A8000A9179C /* PoiGraphic.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B41AC8A27D0D22F008FC426 /* PoiGraphic.swift */; }; 688D7469282E8A8000A9179C /* UserGraphic.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B41AC8C27D0D23E008FC426 /* UserGraphic.swift */; }; 688D746A282E8A8000A9179C /* CircleGraphic.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B41AC8E27D0D26D008FC426 /* CircleGraphic.swift */; }; - 6892E6422A3779AF00CA85A6 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6892E6382A3779AF00CA85A6 /* Localizable.strings */; }; - 6892E6432A3779AF00CA85A6 /* Strings.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6892E63A2A3779AF00CA85A6 /* Strings.swift */; }; - 6892E6442A3779AF00CA85A6 /* Storyboards.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6892E63E2A3779AF00CA85A6 /* Storyboards.swift */; }; - 6892E6452A3779AF00CA85A6 /* Images.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6892E63F2A3779AF00CA85A6 /* Images.swift */; }; - 6892E6462A3779AF00CA85A6 /* Colors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6892E6412A3779AF00CA85A6 /* Colors.swift */; }; 689E0C6E2684ECBC00794DC2 /* ExposureLockViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 682355082680CAB3000E98F3 /* ExposureLockViewModel.swift */; }; 689F050C271825FD00E73690 /* TrajectoryPoint.swift in Sources */ = {isa = PBXBuildFile; fileRef = 685D93732715DEA9005CA99A /* TrajectoryPoint.swift */; }; 68CA6F75275A125C00687A71 /* NSManagedObject+Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B1891C12758F4EE0014E94D /* NSManagedObject+Utils.swift */; }; @@ -1531,22 +1532,23 @@ 58D7676329F7DAD800130D7F /* SettingsGeoFenceCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsGeoFenceCell.swift; sourceTree = ""; }; 58D7676629F9633B00130D7F /* SliderSetting.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SliderSetting.swift; sourceTree = ""; }; 58D7676929FA7DCC00130D7F /* SettingsCellType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsCellType.swift; sourceTree = ""; }; + 58EC8B822A40ADEB00EC1B80 /* SliderHighlightedRange.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SliderHighlightedRange.swift; sourceTree = ""; }; 682355082680CAB3000E98F3 /* ExposureLockViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ExposureLockViewModel.swift; sourceTree = ""; }; 6835F78A270F1F2A008E8B51 /* MapElevationSource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MapElevationSource.swift; sourceTree = ""; }; 685D93732715DEA9005CA99A /* TrajectoryPoint.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TrajectoryPoint.swift; sourceTree = ""; }; + 686361522A4D765C00298BAA /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/Localizable.strings; sourceTree = ""; }; + 686361532A4D765C00298BAA /* Strings.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Strings.swift; sourceTree = ""; }; + 686361542A4D765C00298BAA /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/Localizable.strings; sourceTree = ""; }; + 686361552A4D765C00298BAA /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; }; + 686361562A4D765C00298BAA /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/Localizable.strings; sourceTree = ""; }; + 686361572A4D765C00298BAA /* Storyboards.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Storyboards.swift; sourceTree = ""; }; + 686361582A4D765C00298BAA /* Images.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Images.swift; sourceTree = ""; }; + 686361592A4D765C00298BAA /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/Localizable.strings; sourceTree = ""; }; + 6863615A2A4D765C00298BAA /* Colors.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Colors.swift; sourceTree = ""; }; 6875970A2A14FFEF00C7DAB9 /* anafi3_app_defaults.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = anafi3_app_defaults.plist; sourceTree = ""; }; 687963AF26E7495900033707 /* Camera2Editor+Helpers.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Camera2Editor+Helpers.swift"; sourceTree = ""; }; 687963B126E74AF100033707 /* Camera2Editor+Hdr.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Camera2Editor+Hdr.swift"; sourceTree = ""; }; 687963B726EB495600033707 /* DeviceStateButton.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DeviceStateButton.swift; sourceTree = ""; }; - 6892E6392A3779AF00CA85A6 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/Localizable.strings; sourceTree = ""; }; - 6892E63A2A3779AF00CA85A6 /* Strings.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Strings.swift; sourceTree = ""; }; - 6892E63B2A3779AF00CA85A6 /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/Localizable.strings; sourceTree = ""; }; - 6892E63C2A3779AF00CA85A6 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; }; - 6892E63D2A3779AF00CA85A6 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/Localizable.strings; sourceTree = ""; }; - 6892E63E2A3779AF00CA85A6 /* Storyboards.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Storyboards.swift; sourceTree = ""; }; - 6892E63F2A3779AF00CA85A6 /* Images.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Images.swift; sourceTree = ""; }; - 6892E6402A3779AF00CA85A6 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/Localizable.strings; sourceTree = ""; }; - 6892E6412A3779AF00CA85A6 /* Colors.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Colors.swift; sourceTree = ""; }; 6A0460C42431D29A00F4B828 /* DownloadButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DownloadButton.swift; sourceTree = ""; }; 6A0460C924324AB600F4B828 /* MediaPagerViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MediaPagerViewController.swift; sourceTree = ""; }; 6A0460CC24324AD600F4B828 /* PhotoViewerViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PhotoViewerViewController.swift; sourceTree = ""; }; @@ -2947,7 +2949,7 @@ 44D85DAF1FE10ABF7526E3D2 /* Resources */ = { isa = PBXGroup; children = ( - 6892E6372A3779AF00CA85A6 /* Generated */, + 686361502A4D765C00298BAA /* Generated */, 2DDBA1CC25C992A3009AFD83 /* embedded_missions */, F1B5BB3A0316BA560BB384B7 /* LaunchScreen.xib */, 6A5DE02123CF1229007523EF /* FlightPlan */, @@ -3018,14 +3020,14 @@ path = Constants; sourceTree = ""; }; - 6892E6372A3779AF00CA85A6 /* Generated */ = { + 686361502A4D765C00298BAA /* Generated */ = { isa = PBXGroup; children = ( - 6892E6382A3779AF00CA85A6 /* Localizable.strings */, - 6892E63A2A3779AF00CA85A6 /* Strings.swift */, - 6892E63E2A3779AF00CA85A6 /* Storyboards.swift */, - 6892E63F2A3779AF00CA85A6 /* Images.swift */, - 6892E6412A3779AF00CA85A6 /* Colors.swift */, + 686361512A4D765C00298BAA /* Localizable.strings */, + 686361532A4D765C00298BAA /* Strings.swift */, + 686361572A4D765C00298BAA /* Storyboards.swift */, + 686361582A4D765C00298BAA /* Images.swift */, + 6863615A2A4D765C00298BAA /* Colors.swift */, ); name = Generated; path = OpenFlight/Swiftgen/Generated; @@ -3233,6 +3235,7 @@ 9B8A6FEC24FCF96F0001C719 /* ObstacleAvoidanceSetting.swift */, 4B9DE297289803F800197F21 /* DeveloperSettings.swift */, 58D7676629F9633B00130D7F /* SliderSetting.swift */, + 58EC8B822A40ADEB00EC1B80 /* SliderHighlightedRange.swift */, ); path = Models; sourceTree = ""; @@ -6735,7 +6738,7 @@ E4B570C525FA696400BCEEC4 /* PairingWhereIsWifi.storyboard in Resources */, E4A190D025F8CAC2009F770D /* DroneDetailsInformations.storyboard in Resources */, 9B7EDA1A28F48867009D31C7 /* CameramanModeView.xib in Resources */, - 6892E6422A3779AF00CA85A6 /* Localizable.strings in Resources */, + 6863615B2A4D765D00298BAA /* Localizable.strings in Resources */, F801C3202641AF890008D224 /* yaw.json in Resources */, E42AC25C261CB7DE00A77201 /* SettingsCellularDataCell.xib in Resources */, 3C2D70E624A24BEE003CB44D /* GalleryPanorama.storyboard in Resources */, @@ -7084,6 +7087,7 @@ FB8DC753235F423B005C6378 /* ClosedRange+Utils.swift in Sources */, FBA1763723E076B9006BBF6E /* MapModels.swift in Sources */, 51A5A55F2812ADD300C7FEB2 /* DroneDetailsBatteryViewController.swift in Sources */, + 58EC8B832A40ADEB00EC1B80 /* SliderHighlightedRange.swift in Sources */, 84C827AE23D9EC2A002E52CD /* DateTime+Utils.swift in Sources */, EB6B006525BF1E78005ADA47 /* ULogTag+Utils.swift in Sources */, 7A5404E829A24A74006E220A /* MetricLogsTopBarView.swift in Sources */, @@ -7356,6 +7360,7 @@ AFF38B6E26ADB75200701B4F /* EstimationMenuTableViewCell.swift in Sources */, 2DD3B86A288ADC4600198B2D /* AxisGraphic.swift in Sources */, FBCE8F2B25DFFF23003DEA7F /* AGSGeometryEngine+Utils.swift in Sources */, + 686361612A4D765D00298BAA /* Images.swift in Sources */, 704F57F4299D3E160006FA4C /* FlightPlanExecutionDetailsSettingsProvider.swift in Sources */, FB85544D238ED63400FA7061 /* ImagingSettingsBarViewController.swift in Sources */, E3F74273243F460100921711 /* MediaVideoBottomBarView.swift in Sources */, @@ -7371,6 +7376,7 @@ E43DF5E6256552D300BDEF40 /* AuthenticationUtils.swift in Sources */, 704F5856299D3E160006FA4C /* GimbalTiltService.swift in Sources */, E416E78C237C4BBE00C61FBB /* HUDIndicatorViewModel.swift in Sources */, + 686361632A4D765D00298BAA /* Colors.swift in Sources */, 3B4CD4CF281C5CCC0075AD62 /* AlertsMonitor.swift in Sources */, E376C03B235F4B54003C5914 /* App+Utils.swift in Sources */, 9BD595B8257E343A004835A4 /* ParrotLogEvent+CellularAccess.swift in Sources */, @@ -7454,7 +7460,6 @@ 4BB5F9E827AAE93A0024C922 /* PairingConnectDroneDetailViewModel.swift in Sources */, 2D42F48126FB7C4800933440 /* FlightPlanDashboardListViewController.swift in Sources */, E3EE46942625EF0F00CB69A0 /* DevToolboxCell.swift in Sources */, - 6892E6462A3779AF00CA85A6 /* Colors.swift in Sources */, 3B701A8C27BA4356000D97DC /* MainBannerInfoView.swift in Sources */, 3B3AD667273F9CDD00401F84 /* CollectionViews.swift in Sources */, 9B7ED9EA28F413C4009D31C7 /* DroneLocationGraphicsOverlay.swift in Sources */, @@ -7524,7 +7529,6 @@ 6ABE403423829ED6002D01E1 /* InterfaceViewModel.swift in Sources */, 7AB70ABF27026DF8007E5040 /* UIButton+Publisher.swift in Sources */, 7CC58A4F237AEFD000F286B5 /* BarButtonView.swift in Sources */, - 6892E6452A3779AF00CA85A6 /* Images.swift in Sources */, E376C03C235F4B56003C5914 /* Platform+Utils.swift in Sources */, 3C53F0BC24938331007472FF /* GalleryFormatSDCardChoiceView.swift in Sources */, 436EE843268A061D00E2C239 /* JoysticksService.swift in Sources */, @@ -7592,6 +7596,7 @@ EB671D7A2590B526000B778B /* DroneFirmwaresTableViewCell.swift in Sources */, 6A0460CA24324AB600F4B828 /* MediaPagerViewController.swift in Sources */, 511D293F2812F6610085B775 /* DroneDetailsBatteryViewModel.swift in Sources */, + 6863615F2A4D765D00298BAA /* Storyboards.swift in Sources */, FB4E8B0C237C0A5B00BA4B24 /* RemoteControlButtonGrabber.swift in Sources */, FBEDCC1B237B11EA008E1504 /* PaddingLabel.swift in Sources */, 7CA42B322383E16B0007530D /* GpsLapseMode.swift in Sources */, @@ -7703,9 +7708,9 @@ FB85544F238ED6FA00FA7061 /* UIViewController+Children.swift in Sources */, FBDD9E6025E90759006E8281 /* FlightPlanUnavailabilityReason+Utils.swift in Sources */, 7C53ED8A23C4C002001ABF35 /* SecretView.swift in Sources */, - 6892E6442A3779AF00CA85A6 /* Storyboards.swift in Sources */, 7A8DAB422750CC3F00C38973 /* ActivityProgressView.swift in Sources */, FB4A253F25E50AF300CC120E /* FlightPlanPanelProgressView.swift in Sources */, + 6863615D2A4D765D00298BAA /* Strings.swift in Sources */, E4CF44F8236AE25100B3173B /* NavigationController.swift in Sources */, 6A05F1DC23BE2679003A1EF1 /* Date+Utils.swift in Sources */, 6AA9A46A242A1F0C00E98905 /* GalleryCoordinator.swift in Sources */, @@ -7713,7 +7718,6 @@ 704F584A299D3E160006FA4C /* AirSdkMissionsManager.swift in Sources */, EB34CAB425AF1C6E00035E0A /* FirmwareMissionsUpdatingCase.swift in Sources */, 9B1411012995610D0076E29E /* parrot_missions_ophtalmo_airsdk_messages.pb.swift in Sources */, - 6892E6432A3779AF00CA85A6 /* Strings.swift in Sources */, A3859C53258523F400CE30E3 /* CorrectionViewCell.swift in Sources */, 704F5846299D3E160006FA4C /* PinCodeService.swift in Sources */, 6AE8FCF02382F6570028A2C8 /* SettingsCameraViewController.swift in Sources */, @@ -7944,14 +7948,14 @@ /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ - 6892E6382A3779AF00CA85A6 /* Localizable.strings */ = { + 686361512A4D765C00298BAA /* Localizable.strings */ = { isa = PBXVariantGroup; children = ( - 6892E6392A3779AF00CA85A6 /* de */, - 6892E63B2A3779AF00CA85A6 /* ja */, - 6892E63C2A3779AF00CA85A6 /* en */, - 6892E63D2A3779AF00CA85A6 /* es */, - 6892E6402A3779AF00CA85A6 /* fr */, + 686361522A4D765C00298BAA /* de */, + 686361542A4D765C00298BAA /* ja */, + 686361552A4D765C00298BAA /* en */, + 686361562A4D765C00298BAA /* es */, + 686361592A4D765C00298BAA /* fr */, ); name = Localizable.strings; sourceTree = ""; diff --git a/OpenFlight/OpenFlight/Modules/=Common=/Providers/TouchAndFlyMission.swift b/OpenFlight/OpenFlight/Modules/=Common=/Providers/TouchAndFlyMission.swift index 9db888ef..4f0c5c97 100644 --- a/OpenFlight/OpenFlight/Modules/=Common=/Providers/TouchAndFlyMission.swift +++ b/OpenFlight/OpenFlight/Modules/=Common=/Providers/TouchAndFlyMission.swift @@ -43,7 +43,7 @@ public struct TouchAndFlyActivationModel: MissionActivationModel { public func stopMissionIfNeeded() { _ = Services.hub.connectedDroneHolder.drone?.getPilotingItf(PilotingItfs.pointOfInterest)?.deactivate() - _ = Services.hub.connectedDroneHolder.drone?.getPilotingItf(PilotingItfs.guided)?.deactivate() + _ = Services.hub.connectedDroneHolder.drone?.getPilotingItf(PilotingItfs.pointAndFly)?.deactivate() } /// Whether the mission can be stop. @@ -66,9 +66,9 @@ public struct TouchAndFlyActivationModel: MissionActivationModel { public func isActive() -> Bool { let poi = Services.hub.connectedDroneHolder.drone?.getPilotingItf(PilotingItfs.pointOfInterest) - let guided = Services.hub.connectedDroneHolder.drone?.getPilotingItf(PilotingItfs.guided) - guard let poi = poi, let guided = guided else { return false } - return poi.state == .active || guided.state == .active + let pointAndFly = Services.hub.connectedDroneHolder.drone?.getPilotingItf(PilotingItfs.pointAndFly) + guard let poi = poi, let pointAndFly = pointAndFly else { return false } + return poi.state == .active || pointAndFly.state == .active } public func getPriority() -> MissionPriority { diff --git a/OpenFlight/OpenFlight/Modules/FlightPlan/Edition/Components/SettingValuesChoiceTableViewCell.swift b/OpenFlight/OpenFlight/Modules/FlightPlan/Edition/Components/SettingValuesChoiceTableViewCell.swift index 77b6df8a..7e2487f5 100644 --- a/OpenFlight/OpenFlight/Modules/FlightPlan/Edition/Components/SettingValuesChoiceTableViewCell.swift +++ b/OpenFlight/OpenFlight/Modules/FlightPlan/Edition/Components/SettingValuesChoiceTableViewCell.swift @@ -177,8 +177,7 @@ private extension SettingValuesChoiceTableViewCell { } } button.cornerRadiusedWith(backgroundColor: backgroundColor, - radius: Style.largeCornerRadius, - borderWidth: Style.largeBorderWidth) + radius: Style.largeCornerRadius) button.addShadow() button.isSelected = isSelected button.tintColor = button.isSelected ? .white : ColorName.defaultTextColor.color diff --git a/OpenFlight/OpenFlight/Modules/FlightPlan/ManagePlans/ProjectManager/ProjectManagerViewController.swift b/OpenFlight/OpenFlight/Modules/FlightPlan/ManagePlans/ProjectManager/ProjectManagerViewController.swift index a2c14fdd..644580a5 100644 --- a/OpenFlight/OpenFlight/Modules/FlightPlan/ManagePlans/ProjectManager/ProjectManagerViewController.swift +++ b/OpenFlight/OpenFlight/Modules/FlightPlan/ManagePlans/ProjectManager/ProjectManagerViewController.swift @@ -323,6 +323,7 @@ private extension ProjectManagerViewController { } else { // Cancel the view tap gesture subscriber. tapAroundKeyboardSubscriber?.cancel() + handleProjectNameModification() } } } diff --git a/OpenFlight/OpenFlight/Modules/Gallery/ViewModels/GalleryViewModel.swift b/OpenFlight/OpenFlight/Modules/Gallery/ViewModels/GalleryViewModel.swift index 0f66d197..38976f89 100644 --- a/OpenFlight/OpenFlight/Modules/Gallery/ViewModels/GalleryViewModel.swift +++ b/OpenFlight/OpenFlight/Modules/Gallery/ViewModels/GalleryViewModel.swift @@ -487,6 +487,7 @@ extension GalleryViewModel { start(action: .delete) try await mediaListService.delete(medias: medias) + deselectAll() stop(action: .delete) } diff --git a/OpenFlight/OpenFlight/Modules/Settings/Cells/Advanced/SettingsGeoFenceCell.swift b/OpenFlight/OpenFlight/Modules/Settings/Cells/Advanced/SettingsGeoFenceCell.swift index f858340d..1ebc1fd5 100644 --- a/OpenFlight/OpenFlight/Modules/Settings/Cells/Advanced/SettingsGeoFenceCell.swift +++ b/OpenFlight/OpenFlight/Modules/Settings/Cells/Advanced/SettingsGeoFenceCell.swift @@ -48,6 +48,9 @@ final class SettingsGeoFenceCell: MainTableViewCell, NibReusable { private enum Constants { static let altitudeIndex: Int = 1 static let distanceIndex: Int = 2 + static let distanceMinRange: Float = 10 + static let distanceMaxRange: Float = 1000 + static let distanceHighlightedRangePercent: Float = 0.6 } // MARK: - Override Funcs @@ -62,7 +65,14 @@ final class SettingsGeoFenceCell: MainTableViewCell, NibReusable { guard let viewModel = viewModel as? SettingsGeofenceViewModel else { return } self.viewModel = viewModel - viewModel.notifyChangePublisher + viewModel.isGeofenceActivatedPublisher + .removeDuplicates() + .combineLatest(viewModel.minDistancePublisher.removeDuplicates(), + viewModel.distancePublisher.removeDuplicates(), + viewModel.maxDistancePublisher.removeDuplicates()) + .combineLatest(viewModel.minAltitudePublisher.removeDuplicates(), + viewModel.altitudePublisher.removeDuplicates(), + viewModel.isUpdatingPublisher.removeDuplicates()) .sink { [weak self] _ in guard let self = self else { return } self.updateView() @@ -114,9 +124,14 @@ private extension SettingsGeoFenceCell { /// Configures the distance slider cell. func configureDistanceSliderCell() { let settingSegmentedEntry = viewModel.geoFenceDistanceEntry + let min = Float((settingSegmentedEntry.setting as? SliderSetting)?.min) ?? Constants.distanceMinRange + let max = settingSegmentedEntry.settingStepperSlider?.limitIntervalChange ?? Constants.distanceMaxRange distanceSliderCell.configureCell(settingEntry: settingSegmentedEntry, atIndexPath: IndexPath(row: Constants.distanceIndex, section: 0), - shouldShowBackground: false) + shouldShowBackground: false, + highlightedRange: SliderHighlightedRange(min: min, + max: max, + percent: Constants.distanceHighlightedRangePercent)) distanceSliderCell.enabledMargins = [] } @@ -137,12 +152,12 @@ extension SettingsGeoFenceCell: SettingsSliderCellDelegate { switch indexPath.row { case Constants.altitudeIndex: - if let setting = viewModel.geoFenceAltitudeEntry.setting as? DoubleSetting { + if let setting = viewModel.geoFenceAltitudeEntry.setting as? SliderSetting { setting.value = convertedValue viewModel.saveGeofenceAltitude(convertedValue) } case Constants.distanceIndex: - if let setting = viewModel.geoFenceDistanceEntry.setting as? DoubleSetting { + if let setting = viewModel.geoFenceDistanceEntry.setting as? SliderSetting { setting.value = convertedValue viewModel.saveGeofenceDistance(convertedValue) } diff --git a/OpenFlight/OpenFlight/Modules/Settings/Cells/Advanced/SettingsSliderCell.swift b/OpenFlight/OpenFlight/Modules/Settings/Cells/Advanced/SettingsSliderCell.swift index 8af0ddd4..f063fe29 100644 --- a/OpenFlight/OpenFlight/Modules/Settings/Cells/Advanced/SettingsSliderCell.swift +++ b/OpenFlight/OpenFlight/Modules/Settings/Cells/Advanced/SettingsSliderCell.swift @@ -64,8 +64,9 @@ final class SettingsSliderCell: MainTableViewCell, NibReusable { private var sliderOverLimitValue: Float? private var sliderDefaultValue: Float? private var currentValueIntervalStep: Float = 0.05 - private var currentValueStepped: Float = 0.0 + private var currentValueStepped: Float? private var indexPath: IndexPath! + private var highlightedRange: SliderHighlightedRange? private var isEnabled: Bool = true { didSet { slider.isEnabled = isEnabled @@ -79,7 +80,7 @@ final class SettingsSliderCell: MainTableViewCell, NibReusable { case .percent?: return currentUnit?.value(withFloat: slider.value.percentValue(min: slider.minimumValue, max: slider.maximumValue)) ?? "" default: - return currentUnit?.value(withFloat: slider.value) ?? "" + return currentUnit?.value(withFloat: currentValueStepped ?? slider.value) ?? "" } } @@ -107,13 +108,16 @@ final class SettingsSliderCell: MainTableViewCell, NibReusable { /// - settingEntry: cell setting entry /// - indexPath: indexPath /// - shouldShowBackground: tells if we must show the background + /// - highlightedRange: specific slider range to highlight func configureCell(settingEntry: SettingEntry, atIndexPath indexPath: IndexPath, - shouldShowBackground: Bool = true) { + shouldShowBackground: Bool = true, + highlightedRange: SliderHighlightedRange? = nil) { setupBackground(shouldShow: shouldShowBackground) self.settingEntry = settingEntry self.indexPath = indexPath + self.highlightedRange = highlightedRange titleLabel.text = settingEntry.title currentUnit = settingEntry.unit ?? UnitType.none @@ -126,9 +130,8 @@ final class SettingsSliderCell: MainTableViewCell, NibReusable { if let setting = settingEntry.setting as? DoubleSetting { slider.maximumValue = Float(setting.max) slider.minimumValue = Float(setting.min) - slider.value = settingEntry.savedValue ?? Float(setting.value) + slider.value = settingEntry.savedValue ?? rangeToSliderValue(value: Float(setting.value)) ?? Float(setting.value) } - isEnabled = settingEntry.isEnabled updateSliderView() } @@ -136,6 +139,7 @@ final class SettingsSliderCell: MainTableViewCell, NibReusable { // MARK: - Private Funcs private extension SettingsSliderCell { + /// Add A range to slider /// /// - Parameters: @@ -143,10 +147,12 @@ private extension SettingsSliderCell { func actionStepperSlider(_ settingStepperSlider: SettingStepperSlider) { let minValueSlider = slider.minimumValue let maxValueSlider = slider.maximumValue + var currentValueSlider = sliderToRangeValue() ?? slider.value + let limitIntervalChange = settingStepperSlider.limitIntervalChange let leftIntervalStep = settingStepperSlider.leftIntervalStep let rightIntervalStep = settingStepperSlider.rightIntervalStep - var currentValueSlider = slider.value + if (minValueSlider...limitIntervalChange).contains(currentValueSlider) { currentValueIntervalStep = leftIntervalStep } else { @@ -214,6 +220,56 @@ private extension SettingsSliderCell { ? ColorName.white.color : .clear } + + /// Switch the slider value to its proportional within a highlighted range of values + /// - Returns: the newly created slider value. + func sliderToRangeValue() -> Float? { + guard let highlightedRange = self.highlightedRange else { return nil } + + let minValueSlider = slider.minimumValue + let maxValueSlider = slider.maximumValue + let currentValueSlider = slider.value + let targetMinValue: Float = highlightedRange.min + let targetMaxValue: Float = highlightedRange.max + + let progressPercentage = (slider.value - minValueSlider) / (maxValueSlider - minValueSlider) + + if progressPercentage < highlightedRange.percent { + let rangeMinValue: Float = minValueSlider + let rangeMaxValue: Float = minValueSlider + (maxValueSlider - minValueSlider) * highlightedRange.percent + let rangePercentage = (currentValueSlider - rangeMinValue) / (rangeMaxValue - rangeMinValue) + return targetMinValue + (rangePercentage * (targetMaxValue - targetMinValue)) + } else { + let rangeMinValue: Float = minValueSlider + (maxValueSlider - minValueSlider) * highlightedRange.percent + let rangeMaxValue: Float = maxValueSlider + let rangePercentage = (currentValueSlider - rangeMinValue) / (rangeMaxValue - rangeMinValue) + return targetMaxValue + (rangePercentage * (maxValueSlider - targetMaxValue)) + } + } + + /// Switch a previously computed proportional value back to an original slider value + /// - Returns: the newly created slider value. + func rangeToSliderValue(value: Float) -> Float? { + guard let highlightedRange = self.highlightedRange else { return nil } + + let minValueSlider = slider.minimumValue + let maxValueSlider = slider.maximumValue + let currentValueSlider = value + let targetMinValue: Float = highlightedRange.min + let targetMaxValue: Float = highlightedRange.max + + if currentValueSlider <= targetMaxValue { + let receivedPercentage = (currentValueSlider - targetMinValue) / (targetMaxValue - targetMinValue) + let rangeMinValue: Float = minValueSlider + let rangeMaxValue: Float = minValueSlider + (maxValueSlider - minValueSlider) * highlightedRange.percent + return rangeMinValue + (receivedPercentage * (rangeMaxValue - rangeMinValue)) + } else { + let rangeMinValue: Float = minValueSlider + (maxValueSlider - minValueSlider) * highlightedRange.percent + let rangeMaxValue: Float = maxValueSlider + let receivedPercentage = (currentValueSlider - targetMaxValue) / (maxValueSlider - targetMaxValue) + return rangeMinValue + (receivedPercentage * (rangeMaxValue - rangeMinValue)) + } + } } // MARK: - Actions @@ -226,10 +282,9 @@ private extension SettingsSliderCell { @IBAction func didFinishEditing(_ sender: AnyObject) { if (settingEntry?.settingStepperSlider) != nil { guard let unwSettingStepperSlider = sender as? UISlider else { return } - unwSettingStepperSlider.setValue(currentValueStepped, animated: true) + unwSettingStepperSlider.setValue(currentValueStepped ?? slider.value, animated: false) } - - delegate?.settingsSliderCellSliderDidFinishEditing(value: slider.value, + delegate?.settingsSliderCellSliderDidFinishEditing(value: currentValueStepped ?? slider.value, atIndexPath: indexPath) LogEvent.log(.button(item: settingEntry?.itemLogKey ?? "" + SettingsBehavioursMode.current.logKey , diff --git a/OpenFlight/OpenFlight/Modules/Settings/Models/SliderHighlightedRange.swift b/OpenFlight/OpenFlight/Modules/Settings/Models/SliderHighlightedRange.swift new file mode 100644 index 00000000..c13e9a83 --- /dev/null +++ b/OpenFlight/OpenFlight/Modules/Settings/Models/SliderHighlightedRange.swift @@ -0,0 +1,42 @@ +// Copyright (C) 2023 Parrot Drones SAS +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in +// the documentation and/or other materials provided with the +// distribution. +// * Neither the name of the Parrot Company nor the names +// of its contributors may be used to endorse or promote products +// derived from this software without specific prior written +// permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +// PARROT COMPANY BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +// OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. + +import Foundation + +class SliderHighlightedRange { + var min: Float + var max: Float + var percent: Float + + init(min: Float, max: Float, percent: Float) { + self.min = min + self.max = max + self.percent = percent + } +} diff --git a/OpenFlight/OpenFlight/Modules/Settings/ViewModels/QuickSettingsViewModel.swift b/OpenFlight/OpenFlight/Modules/Settings/ViewModels/QuickSettingsViewModel.swift index 614ee749..eb87cb51 100644 --- a/OpenFlight/OpenFlight/Modules/Settings/ViewModels/QuickSettingsViewModel.swift +++ b/OpenFlight/OpenFlight/Modules/Settings/ViewModels/QuickSettingsViewModel.swift @@ -112,7 +112,7 @@ extension QuickSettingsViewModel { imageDisabled: Asset.Settings.Quick.icStopAudio.image, itemLogKey: LogEvent.LogKeyQuickSettings.audio), SettingEntry(setting: SettingsGeofenceViewModel.geofenceModeModel(geofence: geofence), - title: L10n.settingsAdvancedCategoryGeofence, + title: L10n.settingsQuickCategoryGeofence, itemLogKey: LogEvent.LogKeyQuickSettings.geofence), SettingEntry(setting: newZoomModel, title: L10n.settingsCameraLossyZoom, diff --git a/OpenFlight/OpenFlight/Modules/Settings/ViewModels/SettingsGeofenceViewModel.swift b/OpenFlight/OpenFlight/Modules/Settings/ViewModels/SettingsGeofenceViewModel.swift index dcc78d19..1ba96602 100644 --- a/OpenFlight/OpenFlight/Modules/Settings/ViewModels/SettingsGeofenceViewModel.swift +++ b/OpenFlight/OpenFlight/Modules/Settings/ViewModels/SettingsGeofenceViewModel.swift @@ -31,33 +31,64 @@ import SwiftyUserDefaults import GroundSdk import Combine +private extension ULogTag { + static let tag = ULogTag(name: "SettingsGeofenceViewModel") +} + /// Geofence setting view model. open class SettingsGeofenceViewModel: SettingsViewModelProtocol { - // MARK: - Published Properties - @Published private(set) var isGeofenceActivated: Bool = GeofencePreset.geofenceMode.isGeofenceActive - @Published private(set) var altitude: Double = Defaults.maxAltitudeSetting ?? GeofencePreset.defaultAltitude - @Published private(set) var distance: Double = GeofencePreset.defaultDistance - @Published private(set) var minDistance: Double = GeofencePreset.defaultDistance - @Published private(set) var maxDistance: Double = GeofencePreset.maxDistance - @Published private(set) var minAltitude: Double = GeofencePreset.minAltitude - /// Max altitude is not provided by the drone, it's a preset. - @Published private(set) var maxAltitude: Double = GeofencePreset.maxAltitude - - // MARK: - Public Properties + + // MARK: - Observable properties + private var isGeofenceActivatedSubject = CurrentValueSubject(GeofencePreset.geofenceMode.isGeofenceActive) + public var isGeofenceActivatedPublisher: AnyPublisher { + isGeofenceActivatedSubject.eraseToAnyPublisher() + } + + private var minAltitudeSubject = CurrentValueSubject(GeofencePreset.minAltitude) + public var minAltitudePublisher: AnyPublisher { + minAltitudeSubject.eraseToAnyPublisher() + } + + private var altitudeSubject = CurrentValueSubject(Defaults.maxAltitudeSetting ?? GeofencePreset.defaultAltitude) + public var altitudePublisher: AnyPublisher { + altitudeSubject.eraseToAnyPublisher() + } + + private var minDistanceSubject = CurrentValueSubject(GeofencePreset.defaultDistance) + public var minDistancePublisher: AnyPublisher { + minDistanceSubject.eraseToAnyPublisher() + } + + private var distanceSubject = CurrentValueSubject(GeofencePreset.defaultDistance) + public var distancePublisher: AnyPublisher { + distanceSubject.eraseToAnyPublisher() + } + + private var maxDistanceSubject = CurrentValueSubject(GeofencePreset.maxDistance) + public var maxDistancePublisher: AnyPublisher { + maxDistanceSubject.eraseToAnyPublisher() + } + + private var isUpdatingSubject = CurrentValueSubject(false) + public var isUpdatingPublisher: AnyPublisher { + isUpdatingSubject.eraseToAnyPublisher() + } + + // MARK: - Open Properties /// Returns the setting entry for geoFence mode. - var geoFenceModeEntry: SettingEntry { + open var geoFenceModeEntry: SettingEntry { return SettingEntry(setting: SettingsGeofenceViewModel.geofenceModeModel(geofence: geofence), title: L10n.settingsAdvancedTitleGeofenceActivate, itemLogKey: LogEvent.LogKeyAdvancedSettings.geofence) } /// Returns the setting entry for alitude slider. - var geoFenceAltitudeEntry: SettingEntry { - let sliderSetting = SliderSetting(min: minAltitude, max: maxAltitude, value: altitude) + open var geoFenceAltitudeEntry: SettingEntry { + let sliderSetting = SliderSetting(min: minAltitudeSubject.value, max: maxAltitude, value: altitudeSubject.value) return SettingEntry(setting: sliderSetting, title: L10n.settingsAdvancedTitleGeofenceMaxAlt, unit: UnitType.distance, - defaultValue: Float(altitude), + defaultValue: Float(altitudeSubject.value), isEnabled: geofence?.mode.value.isGeofenceActive ?? GeofencePreset.geofenceMode.isGeofenceActive, itemLogKey: LogEvent.LogKeyAdvancedSettings.geofenceAltitude.description, settingStepperSlider: SettingStepperSlider(limitIntervalChange: Float(sliderSetting.min), @@ -66,17 +97,17 @@ open class SettingsGeofenceViewModel: SettingsViewModelProtocol { } /// Returns the setting entry for distance slider. - var geoFenceDistanceEntry: SettingEntry { - let sliderSetting = SliderSetting(min: minDistance, max: maxDistance, value: distance) + open var geoFenceDistanceEntry: SettingEntry { + let sliderSetting = SliderSetting(min: minDistanceSubject.value, max: maxDistanceSubject.value, value: distanceSubject.value) return SettingEntry(setting: sliderSetting, title: L10n.settingsAdvancedTitleGeofenceMaxDist, unit: UnitType.distance, - defaultValue: Float(distance), + defaultValue: Float(distanceSubject.value), isEnabled: geofence?.mode.value.isGeofenceActive ?? GeofencePreset.geofenceMode.isGeofenceActive, itemLogKey: LogEvent.LogKeyAdvancedSettings.geofenceDistance.description, - settingStepperSlider: SettingStepperSlider(limitIntervalChange: Float(sliderSetting.min), - leftIntervalStep: 1, - rightIntervalStep: 1)) + settingStepperSlider: SettingStepperSlider(limitIntervalChange: 1000.0, + leftIntervalStep: 10, + rightIntervalStep: 100)) } open var settingEntries: [SettingEntry] { @@ -86,7 +117,8 @@ open class SettingsGeofenceViewModel: SettingsViewModelProtocol { open var isUpdating: Bool? = false // MARK: - Private Properties - private(set) var notifyChangePublisher = CurrentValueSubject(()) + /// Max altitude stays as a preset. + private var maxAltitude: Double = GeofencePreset.maxAltitude private var currentDroneHolder: CurrentDroneHolder private var cancellables = Set() private var geofence: Geofence? @@ -98,7 +130,7 @@ open class SettingsGeofenceViewModel: SettingsViewModelProtocol { public init(currentDroneHolder: CurrentDroneHolder) { self.currentDroneHolder = currentDroneHolder - $altitude + altitudePublisher .sink { altitude in Defaults.maxAltitudeSetting = altitude } @@ -108,7 +140,6 @@ open class SettingsGeofenceViewModel: SettingsViewModelProtocol { .sink { [weak self] drone in guard let self = self else { return } self.listenGeofence(drone) - self.listenDistanceGeofence(drone) } .store(in: &cancellables) } @@ -151,21 +182,21 @@ open class SettingsGeofenceViewModel: SettingsViewModelProtocol { supportedValues: GeofenceMode.allValues, currentValue: currentGeofenceMode.value, isUpdating: currentGeofenceMode.updating) { [weak geofence] mode in - // Altitude value is set to max when there is no geofence (mode == .altitude). - if let mode = mode as? GeofenceMode { - switch mode { - case .altitude: - // Set mode, then altitude value. - geofence?.mode.value = .altitude - Defaults.maxAltitudeSetting = geofence?.maxAltitude.value - // Set drone's maxAltitude.max to max altitude - geofence?.maxAltitude.value = geofence?.maxAltitude.max ?? GeofencePreset.maxAltitude - case .cylinder: - // Set altitude value, then mode. - geofence?.maxAltitude.value = Defaults.maxAltitudeSetting ?? GeofencePreset.maxAltitude - geofence?.mode.value = .cylinder - } - } + // Altitude value is set to max when there is no geofence (mode == .altitude). + if let mode = mode as? GeofenceMode { + switch mode { + case .altitude: + // Set mode, then altitude value. + geofence?.mode.value = .altitude + Defaults.maxAltitudeSetting = geofence?.maxAltitude.value + // Set drone's maxAltitude.max to max altitude + geofence?.maxAltitude.value = geofence?.maxAltitude.max ?? GeofencePreset.maxAltitude + case .cylinder: + // Set altitude value, then mode. + geofence?.maxAltitude.value = Defaults.maxAltitudeSetting ?? GeofencePreset.maxAltitude + geofence?.mode.value = .cylinder + } + } } } } @@ -174,35 +205,34 @@ open class SettingsGeofenceViewModel: SettingsViewModelProtocol { private extension SettingsGeofenceViewModel { /// Listen geofence. func listenGeofence(_ drone: Drone) { - geofenceRef = drone.getPeripheral(Peripherals.geofence) { [unowned self] geofence in - if let altitude = geofence?.maxAltitude.value, - let minAltitude = geofence?.maxAltitude.min, - let minDistance = geofence?.maxDistance.min, - let maxDistance = geofence?.maxDistance.max { - isGeofenceActivated = geofence?.mode.value.isGeofenceActive ?? GeofencePreset.geofenceMode.isGeofenceActive - if isGeofenceActivated { + geofenceRef = drone.getPeripheral(Peripherals.geofence) { [weak self] newGeofence in + guard let self = self else { return } + + if let altitude = newGeofence?.maxAltitude.value, + let minAltitude = newGeofence?.maxAltitude.min, + let minDistance = newGeofence?.maxDistance.min, + let maxDistance = newGeofence?.maxDistance.max { + self.isGeofenceActivatedSubject.value = newGeofence?.mode.value.isGeofenceActive ?? GeofencePreset.geofenceMode.isGeofenceActive + if self.isGeofenceActivatedSubject.value == true { // Update only altitude. Distance must not be updated here. - self.altitude = altitude + self.altitudeSubject.value = altitude } // Update min/max (change only first time). - self.maxDistance = maxDistance - self.minAltitude = minAltitude - self.minDistance = minDistance - isUpdating = geofence?.mode.updating ?? false + self.maxDistanceSubject.value = maxDistance + self.minAltitudeSubject.value = minAltitude + self.minDistanceSubject.value = minDistance + self.isUpdating = newGeofence?.mode.updating ?? false } - self.geofence = geofence - notifyChangePublisher.send() - } - } - - /// Listen geofence, dedicated to distance. - func listenDistanceGeofence(_ drone: Drone) { - geofenceDistanceRef = drone.getPeripheral(Peripherals.geofence) { [unowned self] geofence in - if let distance = geofence?.maxDistance.value { + if let distance = newGeofence?.maxDistance.value { // Update only distance. Altitude must not be updated here. - self.distance = distance - notifyChangePublisher.send() + self.distanceSubject.value = distance } + self.isUpdatingSubject.value = self.isUpdating ?? false + self.geofence = newGeofence + + ULog.i(.tag, "Did receive new geoFence attributes: isGeoFenceActive = \(self.isGeofenceActivatedSubject.value) | " + + "currentAlt = \(self.altitudeSubject.value) | currentDist = \(self.distanceSubject.value) | " + + "centerAltitude = \(self.geofence?.center?.altitude) | centerCoordinate \(self.geofence?.center?.coordinate)") } } } diff --git a/OpenFlight/OpenFlight/Resources/Generated/Strings.swift b/OpenFlight/OpenFlight/Resources/Generated/Strings.swift index af441c0f..0779abc3 100644 --- a/OpenFlight/OpenFlight/Resources/Generated/Strings.swift +++ b/OpenFlight/OpenFlight/Resources/Generated/Strings.swift @@ -2029,7 +2029,7 @@ internal enum L10n { internal static let settingsAdvancedCategoryConnection = L10n.tr("Localizable", "settings_advanced_category_connection") /// Developer internal static let settingsAdvancedCategoryDeveloper = L10n.tr("Localizable", "settings_advanced_category_developer") - /// Geocage + /// Flight area internal static let settingsAdvancedCategoryGeofence = L10n.tr("Localizable", "settings_advanced_category_geofence") /// Interface internal static let settingsAdvancedCategoryInterface = L10n.tr("Localizable", "settings_advanced_category_interface") @@ -2306,6 +2306,8 @@ internal enum L10n { internal static let settingsQuickAudioRec = L10n.tr("Localizable", "settings_quick_audio_rec") /// Obstacle avoidance internal static let settingsQuickAvoidance = L10n.tr("Localizable", "settings_quick_avoidance") + /// Geocage + internal static let settingsQuickCategoryGeofence = L10n.tr("Localizable", "settings_quick_category_geofence") /// Extra zoom internal static let settingsQuickExtraZoom = L10n.tr("Localizable", "settings_quick_extra_zoom") /// Hand land diff --git a/OpenFlight/OpenFlight/Resources/Generated/de.lproj/Localizable.strings b/OpenFlight/OpenFlight/Resources/Generated/de.lproj/Localizable.strings index 9a73e14c..4eb6aa3d 100644 --- a/OpenFlight/OpenFlight/Resources/Generated/de.lproj/Localizable.strings +++ b/OpenFlight/OpenFlight/Resources/Generated/de.lproj/Localizable.strings @@ -602,8 +602,9 @@ "settings_controls_mapping_elevation" = "Höhe"; "settings_controls_mapping_camera_rotation" = "Kameraneigung\nRotation"; "settings_controls_mapping_camera_lateral" = "Kameraneigung\nLateral"; +"settings_quick_category_geofence" = "Geocage"; "settings_advanced_category_interface" = "Interface"; -"settings_advanced_category_geofence" = "Geocage"; +"settings_advanced_category_geofence" = "Flight area"; "settings_advanced_title_geofence_activate" = "Activate geocage"; "settings_advanced_title_geofence_max_dist" = "Max distance"; "settings_advanced_title_geofence_max_alt" = "Max altitude"; diff --git a/OpenFlight/OpenFlight/Resources/Generated/en.lproj/Localizable.strings b/OpenFlight/OpenFlight/Resources/Generated/en.lproj/Localizable.strings index 8966baed..37131bae 100644 --- a/OpenFlight/OpenFlight/Resources/Generated/en.lproj/Localizable.strings +++ b/OpenFlight/OpenFlight/Resources/Generated/en.lproj/Localizable.strings @@ -602,8 +602,9 @@ "settings_controls_mapping_elevation" = "Elevation"; "settings_controls_mapping_camera_rotation" = "Camera tilt\nRotation"; "settings_controls_mapping_camera_lateral" = "Camera tilt\nLateral"; +"settings_quick_category_geofence" = "Geocage"; "settings_advanced_category_interface" = "Interface"; -"settings_advanced_category_geofence" = "Geocage"; +"settings_advanced_category_geofence" = "Flight area"; "settings_advanced_title_geofence_activate" = "Activate geocage"; "settings_advanced_title_geofence_max_dist" = "Max distance"; "settings_advanced_title_geofence_max_alt" = "Max altitude"; diff --git a/OpenFlight/OpenFlight/Resources/Generated/es.lproj/Localizable.strings b/OpenFlight/OpenFlight/Resources/Generated/es.lproj/Localizable.strings index 16508fe4..a93cad67 100644 --- a/OpenFlight/OpenFlight/Resources/Generated/es.lproj/Localizable.strings +++ b/OpenFlight/OpenFlight/Resources/Generated/es.lproj/Localizable.strings @@ -602,8 +602,9 @@ "settings_controls_mapping_elevation" = "Elevación"; "settings_controls_mapping_camera_rotation" = "Inclinación de la cámara\nRotation"; "settings_controls_mapping_camera_lateral" = "Inclinación de la cámara\nLateral"; +"settings_quick_category_geofence" = "Barrera geográfica"; "settings_advanced_category_interface" = "Interfaz"; -"settings_advanced_category_geofence" = "Barrera geográfica"; +"settings_advanced_category_geofence" = "Flight area"; "settings_advanced_title_geofence_activate" = "Activate geocage"; "settings_advanced_title_geofence_max_dist" = "Max distance"; "settings_advanced_title_geofence_max_alt" = "Max altitude"; diff --git a/OpenFlight/OpenFlight/Resources/Generated/fr.lproj/Localizable.strings b/OpenFlight/OpenFlight/Resources/Generated/fr.lproj/Localizable.strings index cd30446d..011e13d9 100644 --- a/OpenFlight/OpenFlight/Resources/Generated/fr.lproj/Localizable.strings +++ b/OpenFlight/OpenFlight/Resources/Generated/fr.lproj/Localizable.strings @@ -602,8 +602,9 @@ "settings_controls_mapping_elevation" = "Élévation"; "settings_controls_mapping_camera_rotation" = "Tilt caméra\nRotation"; "settings_controls_mapping_camera_lateral" = "Tilt caméra\nLateral"; +"settings_quick_category_geofence" = "Géo-cage"; "settings_advanced_category_interface" = "Interface"; -"settings_advanced_category_geofence" = "Géo-cage"; +"settings_advanced_category_geofence" = "Espace de vol"; "settings_advanced_title_geofence_activate" = "Activer la fonction géo-cage"; "settings_advanced_title_geofence_max_dist" = "Distance maximum"; "settings_advanced_title_geofence_max_alt" = "Altitude maximum"; diff --git a/OpenFlight/OpenFlight/Resources/Generated/ja.lproj/Localizable.strings b/OpenFlight/OpenFlight/Resources/Generated/ja.lproj/Localizable.strings index a6617fb9..ecfeb666 100644 --- a/OpenFlight/OpenFlight/Resources/Generated/ja.lproj/Localizable.strings +++ b/OpenFlight/OpenFlight/Resources/Generated/ja.lproj/Localizable.strings @@ -602,8 +602,9 @@ "settings_controls_mapping_elevation" = "上昇"; "settings_controls_mapping_camera_rotation" = "カメラ・チルト\nRotation"; "settings_controls_mapping_camera_lateral" = "カメラ・チルト\nLateral"; +"settings_quick_category_geofence" = "Geocage"; "settings_advanced_category_interface" = "インターフェース"; -"settings_advanced_category_geofence" = "Geocage"; +"settings_advanced_category_geofence" = "Flight area"; "settings_advanced_title_geofence_activate" = "Activate geocage"; "settings_advanced_title_geofence_max_dist" = "Max distance"; "settings_advanced_title_geofence_max_alt" = "Max altitude"; diff --git a/OpenFlight/OpenFlight/Services/AlertsMonitor.swift b/OpenFlight/OpenFlight/Services/AlertsMonitor.swift index 36132e9f..cfc52d15 100644 --- a/OpenFlight/OpenFlight/Services/AlertsMonitor.swift +++ b/OpenFlight/OpenFlight/Services/AlertsMonitor.swift @@ -270,7 +270,7 @@ private extension AlertsMonitor { /// - Parameter drone: drone to monitor func listenMotors(drone: Drone) { motorsRef = drone.getPeripheral(Peripherals.copterMotors) { [weak self] copterMotors in - self?.copterMotorsBannerAlerts = copterMotors?.bannerAlerts ?? [CriticalBannerAlert.motorCutout] + self?.copterMotorsBannerAlerts = copterMotors?.bannerAlerts ?? [] } } diff --git a/OpenFlight/OpenFlight/Shared/CommonServices/Drone/CurrentDroneHolder.swift b/OpenFlight/OpenFlight/Shared/CommonServices/Drone/CurrentDroneHolder.swift index 836ec657..13b3ea54 100644 --- a/OpenFlight/OpenFlight/Shared/CommonServices/Drone/CurrentDroneHolder.swift +++ b/OpenFlight/OpenFlight/Shared/CommonServices/Drone/CurrentDroneHolder.swift @@ -90,7 +90,11 @@ class CurrentDroneHolderImpl: CurrentDroneHolder { .compactMap({ $0 }) .filter { [unowned self] drone in // Avoid triggering anything when the drone instance is the same - drone.uid != self.drone.uid + if drone.uid != self.drone.uid || (drone.uid == self.drone.uid && drone.isConnected != self.drone.isConnected) { + return true + } else { + return false + } } .sink { [unowned self] drone in // Store the drone uid for availability in future sessions diff --git a/OpenFlight/OpenFlight/Shared/CommonServices/Drone/OphtalmoService.swift b/OpenFlight/OpenFlight/Shared/CommonServices/Drone/OphtalmoService.swift index cd81e772..6c4ee91e 100644 --- a/OpenFlight/OpenFlight/Shared/CommonServices/Drone/OphtalmoService.swift +++ b/OpenFlight/OpenFlight/Shared/CommonServices/Drone/OphtalmoService.swift @@ -259,10 +259,7 @@ extension OphtalmoServiceImpl: OphtalmoService { do { let event = try MissionEvent(serializedData: message.payload) - guard event.state.calibrationStatus != .aborted else { - self.resetCalibration() - return - } + self.calibrationAltitudeSubject.value = event.state.config.altitude self.calibrationStepSubject.value = event.state.calibrationStep self.calibrationStatusSubject.value = event.state.calibrationStatus diff --git a/OpenFlight/OpenFlight/Shared/CommonServices/Drone/RthService.swift b/OpenFlight/OpenFlight/Shared/CommonServices/Drone/RthService.swift index a40a64a1..62861847 100644 --- a/OpenFlight/OpenFlight/Shared/CommonServices/Drone/RthService.swift +++ b/OpenFlight/OpenFlight/Shared/CommonServices/Drone/RthService.swift @@ -235,7 +235,7 @@ private extension RthServiceImpl { self.homeDestinationSubject.value = ReturnHomeDestination( location: Location3D(coordinate: homeLocation.coordinate, altitude: homeLocation.altitude), target: currentTarget) - } else if let userLocation3D = userLocation.coordinates, userLocation.isValid { + } else if currentTarget == .controllerPosition, let userLocation3D = userLocation.coordinates, userLocation.isValid { self.homeDestinationSubject.value = ReturnHomeDestination( location: Location3D(coordinate: userLocation3D.coordinate, altitude: userLocation3D.altitude), target: currentTarget) diff --git a/OpenFlight/OpenFlight/Swiftgen/Generated/Strings.swift b/OpenFlight/OpenFlight/Swiftgen/Generated/Strings.swift index af441c0f..0779abc3 100644 --- a/OpenFlight/OpenFlight/Swiftgen/Generated/Strings.swift +++ b/OpenFlight/OpenFlight/Swiftgen/Generated/Strings.swift @@ -2029,7 +2029,7 @@ internal enum L10n { internal static let settingsAdvancedCategoryConnection = L10n.tr("Localizable", "settings_advanced_category_connection") /// Developer internal static let settingsAdvancedCategoryDeveloper = L10n.tr("Localizable", "settings_advanced_category_developer") - /// Geocage + /// Flight area internal static let settingsAdvancedCategoryGeofence = L10n.tr("Localizable", "settings_advanced_category_geofence") /// Interface internal static let settingsAdvancedCategoryInterface = L10n.tr("Localizable", "settings_advanced_category_interface") @@ -2306,6 +2306,8 @@ internal enum L10n { internal static let settingsQuickAudioRec = L10n.tr("Localizable", "settings_quick_audio_rec") /// Obstacle avoidance internal static let settingsQuickAvoidance = L10n.tr("Localizable", "settings_quick_avoidance") + /// Geocage + internal static let settingsQuickCategoryGeofence = L10n.tr("Localizable", "settings_quick_category_geofence") /// Extra zoom internal static let settingsQuickExtraZoom = L10n.tr("Localizable", "settings_quick_extra_zoom") /// Hand land diff --git a/OpenFlight/OpenFlight/Swiftgen/Generated/de.lproj/Localizable.strings b/OpenFlight/OpenFlight/Swiftgen/Generated/de.lproj/Localizable.strings index 9a73e14c..4eb6aa3d 100644 --- a/OpenFlight/OpenFlight/Swiftgen/Generated/de.lproj/Localizable.strings +++ b/OpenFlight/OpenFlight/Swiftgen/Generated/de.lproj/Localizable.strings @@ -602,8 +602,9 @@ "settings_controls_mapping_elevation" = "Höhe"; "settings_controls_mapping_camera_rotation" = "Kameraneigung\nRotation"; "settings_controls_mapping_camera_lateral" = "Kameraneigung\nLateral"; +"settings_quick_category_geofence" = "Geocage"; "settings_advanced_category_interface" = "Interface"; -"settings_advanced_category_geofence" = "Geocage"; +"settings_advanced_category_geofence" = "Flight area"; "settings_advanced_title_geofence_activate" = "Activate geocage"; "settings_advanced_title_geofence_max_dist" = "Max distance"; "settings_advanced_title_geofence_max_alt" = "Max altitude"; diff --git a/OpenFlight/OpenFlight/Swiftgen/Generated/en.lproj/Localizable.strings b/OpenFlight/OpenFlight/Swiftgen/Generated/en.lproj/Localizable.strings index 8966baed..37131bae 100644 --- a/OpenFlight/OpenFlight/Swiftgen/Generated/en.lproj/Localizable.strings +++ b/OpenFlight/OpenFlight/Swiftgen/Generated/en.lproj/Localizable.strings @@ -602,8 +602,9 @@ "settings_controls_mapping_elevation" = "Elevation"; "settings_controls_mapping_camera_rotation" = "Camera tilt\nRotation"; "settings_controls_mapping_camera_lateral" = "Camera tilt\nLateral"; +"settings_quick_category_geofence" = "Geocage"; "settings_advanced_category_interface" = "Interface"; -"settings_advanced_category_geofence" = "Geocage"; +"settings_advanced_category_geofence" = "Flight area"; "settings_advanced_title_geofence_activate" = "Activate geocage"; "settings_advanced_title_geofence_max_dist" = "Max distance"; "settings_advanced_title_geofence_max_alt" = "Max altitude"; diff --git a/OpenFlight/OpenFlight/Swiftgen/Generated/es.lproj/Localizable.strings b/OpenFlight/OpenFlight/Swiftgen/Generated/es.lproj/Localizable.strings index 16508fe4..a93cad67 100644 --- a/OpenFlight/OpenFlight/Swiftgen/Generated/es.lproj/Localizable.strings +++ b/OpenFlight/OpenFlight/Swiftgen/Generated/es.lproj/Localizable.strings @@ -602,8 +602,9 @@ "settings_controls_mapping_elevation" = "Elevación"; "settings_controls_mapping_camera_rotation" = "Inclinación de la cámara\nRotation"; "settings_controls_mapping_camera_lateral" = "Inclinación de la cámara\nLateral"; +"settings_quick_category_geofence" = "Barrera geográfica"; "settings_advanced_category_interface" = "Interfaz"; -"settings_advanced_category_geofence" = "Barrera geográfica"; +"settings_advanced_category_geofence" = "Flight area"; "settings_advanced_title_geofence_activate" = "Activate geocage"; "settings_advanced_title_geofence_max_dist" = "Max distance"; "settings_advanced_title_geofence_max_alt" = "Max altitude"; diff --git a/OpenFlight/OpenFlight/Swiftgen/Generated/fr.lproj/Localizable.strings b/OpenFlight/OpenFlight/Swiftgen/Generated/fr.lproj/Localizable.strings index cd30446d..011e13d9 100644 --- a/OpenFlight/OpenFlight/Swiftgen/Generated/fr.lproj/Localizable.strings +++ b/OpenFlight/OpenFlight/Swiftgen/Generated/fr.lproj/Localizable.strings @@ -602,8 +602,9 @@ "settings_controls_mapping_elevation" = "Élévation"; "settings_controls_mapping_camera_rotation" = "Tilt caméra\nRotation"; "settings_controls_mapping_camera_lateral" = "Tilt caméra\nLateral"; +"settings_quick_category_geofence" = "Géo-cage"; "settings_advanced_category_interface" = "Interface"; -"settings_advanced_category_geofence" = "Géo-cage"; +"settings_advanced_category_geofence" = "Espace de vol"; "settings_advanced_title_geofence_activate" = "Activer la fonction géo-cage"; "settings_advanced_title_geofence_max_dist" = "Distance maximum"; "settings_advanced_title_geofence_max_alt" = "Altitude maximum"; diff --git a/OpenFlight/OpenFlight/Swiftgen/Generated/ja.lproj/Localizable.strings b/OpenFlight/OpenFlight/Swiftgen/Generated/ja.lproj/Localizable.strings index a6617fb9..ecfeb666 100644 --- a/OpenFlight/OpenFlight/Swiftgen/Generated/ja.lproj/Localizable.strings +++ b/OpenFlight/OpenFlight/Swiftgen/Generated/ja.lproj/Localizable.strings @@ -602,8 +602,9 @@ "settings_controls_mapping_elevation" = "上昇"; "settings_controls_mapping_camera_rotation" = "カメラ・チルト\nRotation"; "settings_controls_mapping_camera_lateral" = "カメラ・チルト\nLateral"; +"settings_quick_category_geofence" = "Geocage"; "settings_advanced_category_interface" = "インターフェース"; -"settings_advanced_category_geofence" = "Geocage"; +"settings_advanced_category_geofence" = "Flight area"; "settings_advanced_title_geofence_activate" = "Activate geocage"; "settings_advanced_title_geofence_max_dist" = "Max distance"; "settings_advanced_title_geofence_max_alt" = "Max altitude"; diff --git a/OpenFlight/OpenFlight/Swiftgen/strings.csv b/OpenFlight/OpenFlight/Swiftgen/strings.csv index f8932856..10d62440 100644 --- a/OpenFlight/OpenFlight/Swiftgen/strings.csv +++ b/OpenFlight/OpenFlight/Swiftgen/strings.csv @@ -601,8 +601,9 @@ Controls - Mapping: Elevation and Lateral;settings_controls_mapping_elevation_la Controls - Mapping: Elevation;settings_controls_mapping_elevation;Elevation;Élévation;Höhe;Elevación;上昇 Controls - Mapping: camera rotation;settings_controls_mapping_camera_rotation;Camera tilt\nRotation;Tilt caméra\nRotation;Kameraneigung\nRotation;Inclinación de la cámara\nRotation;カメラ・チルト\nRotation Controls - Mapping: camera lateral;settings_controls_mapping_camera_lateral;Camera tilt\nLateral;Tilt caméra\nLateral;Kameraneigung\nLateral;Inclinación de la cámara\nLateral;カメラ・チルト\nLateral +Quick - Category: Geofence;settings_quick_category_geofence;Geocage;Géo-cage;Geocage;Barrera geográfica;Geocage Advanced - Category: Interface;settings_advanced_category_interface;Interface;Interface;Interface;Interfaz;インターフェース -Advanced - Category: Geofence;settings_advanced_category_geofence;Geocage;Géo-cage;Geocage;Barrera geográfica;Geocage +Advanced - Category: Geofence;settings_advanced_category_geofence;Flight area;Espace de vol;Flight area;Flight area;Flight area Advanced – Title: Geofence activate;settings_advanced_title_geofence_activate;Activate geocage;Activer la fonction géo-cage;Activate geocage;Activate geocage;Activate geocage Advanced – Title: Geofence max distance;settings_advanced_title_geofence_max_dist;Max distance;Distance maximum;Max distance;Max distance;Max distance Advanced – Title: Geofence max altitude;settings_advanced_title_geofence_max_alt;Max altitude;Altitude maximum;Max altitude;Max altitude;Max altitude diff --git a/OpenFlight/Podfile b/OpenFlight/Podfile index 6a914495..dd43b6cd 100644 --- a/OpenFlight/Podfile +++ b/OpenFlight/Podfile @@ -2,10 +2,10 @@ platform :ios, '14.0' target 'OpenFlightApp' do use_frameworks! - pod 'GroundSdk', '7.7.0-rc1' - pod 'ArsdkEngine', '7.7.0-rc1' - pod 'SdkCore', '7.7.0-rc1' - pod 'OpenFlightCore', '7.7.0-rc1' + pod 'GroundSdk', '7.7.0' + pod 'ArsdkEngine', '7.7.0' + pod 'SdkCore', '7.7.0' + pod 'OpenFlightCore', '7.7.0' pod 'SwiftGen', '6.5.1' pod 'SwiftLint', '0.50.3' pod 'Reusable', '4.1.2' @@ -14,3 +14,13 @@ target 'OpenFlightApp' do pod 'lottie-ios', '4.0.1' pod 'ArcGIS-Runtime-SDK-iOS', '~> 100.15' end + +post_install do |installer| + installer.generated_projects.each do |project| + project.targets.each do |target| + target.build_configurations.each do |config| + config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0' + end + end + end +end diff --git a/OpenFlight/config.xcconfig b/OpenFlight/config.xcconfig index cc2f9f73..3708ee53 100644 --- a/OpenFlight/config.xcconfig +++ b/OpenFlight/config.xcconfig @@ -2,4 +2,4 @@ PRODUCT_BUNDLE_IDENTIFIER = com.parrot.drone.openpenflight IPHONEOS_DEPLOYMENT_TARGET = None SWIFT_VERSION = None -APP_VERSION = 7.7.0-rc1 \ No newline at end of file +APP_VERSION = 7.7.0-rc6 \ No newline at end of file