From ce7a03dffc6a0f4f1ec2a2db92c44912d1409e89 Mon Sep 17 00:00:00 2001 From: burlakov Date: Thu, 30 Nov 2023 10:16:29 +0300 Subject: [PATCH 1/3] fix (uav): fix anchor angle if vehicle is a plane Asana: https://app.asana.com/0/1203851531040615/1206062814171957/f --- .../Layers/Anchors/UavAnchor/FlightUavAnchor.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/Asv.Drones.Gui.Uav/Shell/Pages/Flight/Layers/Anchors/UavAnchor/FlightUavAnchor.cs b/src/Asv.Drones.Gui.Uav/Shell/Pages/Flight/Layers/Anchors/UavAnchor/FlightUavAnchor.cs index 8d6e0c02..7f6af9d5 100644 --- a/src/Asv.Drones.Gui.Uav/Shell/Pages/Flight/Layers/Anchors/UavAnchor/FlightUavAnchor.cs +++ b/src/Asv.Drones.Gui.Uav/Shell/Pages/Flight/Layers/Anchors/UavAnchor/FlightUavAnchor.cs @@ -34,7 +34,17 @@ public FlightUavAnchor(IVehicleClient vehicle,ILocalizationService loc,IEnumerab IsVisible = true; Icon = MavlinkHelper.GetIcon(vehicle.Class); vehicle.Position.Current.Subscribe(_ => Location = _).DisposeItWith(Disposable); - vehicle.Position.Yaw.Select(_ => Math.Round(_, 0)).DistinctUntilChanged().Subscribe(_ => RotateAngle = _).DisposeItWith(Disposable); + vehicle.Position.Yaw.Select(_ => Math.Round(_, 0)).DistinctUntilChanged().Subscribe(v => + { + if (vehicle.Class == DeviceClass.Plane) + { + RotateAngle = v - 45; + } + else + { + RotateAngle = v; + } + }).DisposeItWith(Disposable); Title = vehicle.Name.Value; vehicle.Name.Subscribe(_ => Title = _).DisposeItWith(Disposable); vehicle.Position.Current.Subscribe(_ => UpdateDescription()).DisposeItWith(Disposable); From 880dfe9aaef2972b21cfe54e0fed863bded96ccb Mon Sep 17 00:00:00 2001 From: burlakov Date: Thu, 30 Nov 2023 10:23:01 +0300 Subject: [PATCH 2/3] fix (sdr): fix update mode localization Asana: https://app.asana.com/0/1203851531040615/1206062814171959/f --- src/Asv.Drones.Gui.Sdr/RS.Designer.cs | 9 +++++++++ src/Asv.Drones.Gui.Sdr/RS.resx | 3 +++ src/Asv.Drones.Gui.Sdr/RS.ru.resx | 3 +++ .../Shell/Pages/Flight/Widgets/Sdr/FlightSdrView.axaml | 3 +-- 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/Asv.Drones.Gui.Sdr/RS.Designer.cs b/src/Asv.Drones.Gui.Sdr/RS.Designer.cs index 5e6fce11..0e05c1e9 100644 --- a/src/Asv.Drones.Gui.Sdr/RS.Designer.cs +++ b/src/Asv.Drones.Gui.Sdr/RS.Designer.cs @@ -104,6 +104,15 @@ public static string FlightSdrView_SystemControlAction_Shutdown_Title { } } + /// + /// Looks up a localized string similar to Update mode. + /// + public static string FlightSdrView_UpdateMode_Title { + get { + return ResourceManager.GetString("FlightSdrView_UpdateMode_Title", resourceCulture); + } + } + /// /// Looks up a localized string similar to Value must be greater than 0. /// diff --git a/src/Asv.Drones.Gui.Sdr/RS.resx b/src/Asv.Drones.Gui.Sdr/RS.resx index f82811d8..33212303 100644 --- a/src/Asv.Drones.Gui.Sdr/RS.resx +++ b/src/Asv.Drones.Gui.Sdr/RS.resx @@ -327,4 +327,7 @@ Set mode + + Update mode + \ No newline at end of file diff --git a/src/Asv.Drones.Gui.Sdr/RS.ru.resx b/src/Asv.Drones.Gui.Sdr/RS.ru.resx index 82d9a540..df589dff 100644 --- a/src/Asv.Drones.Gui.Sdr/RS.ru.resx +++ b/src/Asv.Drones.Gui.Sdr/RS.ru.resx @@ -320,4 +320,7 @@ Установить режим + + Обновить режим + \ No newline at end of file diff --git a/src/Asv.Drones.Gui.Sdr/Shell/Pages/Flight/Widgets/Sdr/FlightSdrView.axaml b/src/Asv.Drones.Gui.Sdr/Shell/Pages/Flight/Widgets/Sdr/FlightSdrView.axaml index 3e01ad47..37ebd24d 100644 --- a/src/Asv.Drones.Gui.Sdr/Shell/Pages/Flight/Widgets/Sdr/FlightSdrView.axaml +++ b/src/Asv.Drones.Gui.Sdr/Shell/Pages/Flight/Widgets/Sdr/FlightSdrView.axaml @@ -109,9 +109,8 @@