From 2a1f1f8f44b64a27ad25dda84568ccf31b5cd5ff Mon Sep 17 00:00:00 2001 From: "sushi.at" Date: Fri, 24 Nov 2023 22:27:09 +0000 Subject: [PATCH 1/2] Fixed and centralized all XP engine type datarefs now to solve flight tracking and aircraft type issues Bumped version up to 0.5.4 (for all projects this time) --- .../Properties/AssemblyInfo.cs | 6 +- .../Properties/AssemblyInfo.cs | 6 +- OpenSky.Agent.UdpXPlane11/EngineType.cs | 131 ++++++++++++++++++ .../Models/AircraftIdentityDataRef.cs | 16 +-- .../Models/FuelTanksDataRef.cs | 14 +- .../Models/WeightAndBalanceDataRef.cs | 16 +-- .../OpenSky.Agent.UdpXPlane11.csproj | 1 + .../Properties/AssemblyInfo.cs | 6 +- OpenSky.Agent/Properties/AssemblyInfo.cs | 4 +- OpenSky.Agent/Views/AircraftTypes.xaml | 8 +- .../Views/Models/AircraftTypesViewModel.cs | 1 + changelog.txt | 6 + 12 files changed, 157 insertions(+), 58 deletions(-) create mode 100644 OpenSky.Agent.UdpXPlane11/EngineType.cs diff --git a/OpenSky.Agent.SimConnectMSFS/Properties/AssemblyInfo.cs b/OpenSky.Agent.SimConnectMSFS/Properties/AssemblyInfo.cs index 57463c6..acbad44 100644 --- a/OpenSky.Agent.SimConnectMSFS/Properties/AssemblyInfo.cs +++ b/OpenSky.Agent.SimConnectMSFS/Properties/AssemblyInfo.cs @@ -12,10 +12,10 @@ [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("OpenSky")] [assembly: AssemblyProduct("OpenSky")] -[assembly: AssemblyCopyright("OpenSky project 2021-2022")] +[assembly: AssemblyCopyright("OpenSky project 2021-2023")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] [assembly: Guid("1f9cbede-669d-4510-bca2-e6ad29d6a498")] -[assembly: AssemblyVersion("0.5.0")] -[assembly: AssemblyFileVersion("0.5.0")] \ No newline at end of file +[assembly: AssemblyVersion("0.5.4")] +[assembly: AssemblyFileVersion("0.5.4")] \ No newline at end of file diff --git a/OpenSky.Agent.Simulator/Properties/AssemblyInfo.cs b/OpenSky.Agent.Simulator/Properties/AssemblyInfo.cs index 0c0dc14..87d41f7 100644 --- a/OpenSky.Agent.Simulator/Properties/AssemblyInfo.cs +++ b/OpenSky.Agent.Simulator/Properties/AssemblyInfo.cs @@ -12,10 +12,10 @@ [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("OpenSky")] [assembly: AssemblyProduct("OpenSky")] -[assembly: AssemblyCopyright("OpenSky project 2021-2022")] +[assembly: AssemblyCopyright("OpenSky project 2021-2023")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] [assembly: Guid("30c467e8-2eee-41e5-be01-0142a61ba171")] -[assembly: AssemblyVersion("0.5.0")] -[assembly: AssemblyFileVersion("0.5.0")] \ No newline at end of file +[assembly: AssemblyVersion("0.5.4")] +[assembly: AssemblyFileVersion("0.5.4")] \ No newline at end of file diff --git a/OpenSky.Agent.UdpXPlane11/EngineType.cs b/OpenSky.Agent.UdpXPlane11/EngineType.cs new file mode 100644 index 0000000..d345e43 --- /dev/null +++ b/OpenSky.Agent.UdpXPlane11/EngineType.cs @@ -0,0 +1,131 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// OpenSky project 2021-2023 +// +// -------------------------------------------------------------------------------------------------------------------- + +namespace OpenSky.Agent.UdpXPlane11 +{ + /// ------------------------------------------------------------------------------------------------- + /// + /// XPlane engine type. + /// + /// + /// sushi.at, 24/11/2023. + /// + /// ------------------------------------------------------------------------------------------------- + public static class EngineType + { + /// ------------------------------------------------------------------------------------------------- + /// + /// Gets fuel weight for engine type. + /// + /// + /// sushi.at, 24/11/2023. + /// + /// + /// Type of the engine. + /// + /// + /// The fuel weight in lbs per gallon. + /// + /// ------------------------------------------------------------------------------------------------- + public static double GetFuelWeightForEngineType(int engineType) + { + return engineType switch + { + // Reciprocating carburetor + 0 => 6, + + // Reciprocating injected + 1 => 6, + + // Free turbo deprecated + 2 => 6.7, + + // Electric engine + 3 => 0, + + // Lo Bypass Jet deprecated + 4 => 6.7, + + // Single spool jet + 5 => 6.7, + + // Rocket + 6 => 0, + + // Multi spool jet + 7 => 6.7, + + // Turbo Prop Fixed deprecated + 8 => 6.7, + + // Free turbo prop + 9 => 6.7, + + // Fixed turbo prop + 10 => 6.7, + + // Unknown engine type + _ => 0 + }; + } + + /// ------------------------------------------------------------------------------------------------- + /// + /// Convert engine type to OpenSky enum. + /// + /// + /// sushi.at, 24/11/2023. + /// + /// + /// Type of the engine from xplane. + /// + /// + /// The engine type converted to OpenSky. + /// + /// ------------------------------------------------------------------------------------------------- + public static OpenSkyApi.EngineType ConvertEngineType(int engineType) + { + return engineType switch + { + // Reciprocating carburetor + 0 => OpenSkyApi.EngineType.Piston, + + // Reciprocating injected + 1 => OpenSkyApi.EngineType.Piston, + + // Free turbo deprecated + 2 => OpenSkyApi.EngineType.Turboprop, + + // Electric engine + 3 => OpenSkyApi.EngineType.Unsupported, + + // Lo Bypass Jet deprecated + 4 => OpenSkyApi.EngineType.Jet, + + // Single spool jet + 5 => OpenSkyApi.EngineType.Jet, + + // Rocket + 6 => OpenSkyApi.EngineType.Unsupported, + + // Multi spool jet + 7 => OpenSkyApi.EngineType.Jet, + + // Turbo Prop Fixed deprecated + 8 => OpenSkyApi.EngineType.Turboprop, + + // Free turbo prop + 9 => OpenSkyApi.EngineType.Turboprop, + + // Fixed turbo prop + 10 => OpenSkyApi.EngineType.Turboprop, + + // Unknown engine type + _ => OpenSkyApi.EngineType.None + }; + } + } +} \ No newline at end of file diff --git a/OpenSky.Agent.UdpXPlane11/Models/AircraftIdentityDataRef.cs b/OpenSky.Agent.UdpXPlane11/Models/AircraftIdentityDataRef.cs index 23a00f1..0ad2f51 100644 --- a/OpenSky.Agent.UdpXPlane11/Models/AircraftIdentityDataRef.cs +++ b/OpenSky.Agent.UdpXPlane11/Models/AircraftIdentityDataRef.cs @@ -6,8 +6,6 @@ namespace OpenSky.Agent.UdpXPlane11.Models { - using OpenSkyApi; - using XPlaneConnector; using XPlaneConnector.DataRefs; @@ -162,19 +160,7 @@ private void DataRefUpdated(DataRefElement element, float value) if (element.DataRef.StartsWith(DataRefs.AircraftPropAcfEnType.DataRef)) { - this.EngineType = (int)value switch - { - 0 => EngineType.Piston, - 1 => EngineType.Piston, - 2 => EngineType.Turboprop, - 3 => EngineType.Unsupported, // Electric engine - 4 => EngineType.Jet, - 5 => EngineType.Jet, - 6 => EngineType.Unsupported, // Rocket - 7 => EngineType.Unsupported, // Tip rockets - 8 => EngineType.Turboprop, - _ => EngineType.None - }; + this.EngineType = Agent.UdpXPlane11.EngineType.ConvertEngineType((int)value); } if (element.DataRef == DataRefs.AircraftGearAcfGearRetract.DataRef) diff --git a/OpenSky.Agent.UdpXPlane11/Models/FuelTanksDataRef.cs b/OpenSky.Agent.UdpXPlane11/Models/FuelTanksDataRef.cs index 2c03cee..ea17c7b 100644 --- a/OpenSky.Agent.UdpXPlane11/Models/FuelTanksDataRef.cs +++ b/OpenSky.Agent.UdpXPlane11/Models/FuelTanksDataRef.cs @@ -209,19 +209,7 @@ private void DataRefUpdated(DataRefElement element, float value) if (element.DataRef.StartsWith(DataRefs.AircraftPropAcfEnType.DataRef)) { - this.fuelWeight = (int)value switch - { - 0 => 6, - 1 => 6, - 2 => 6.7, - 3 => 0, // Electric engine - 4 => 6.7, - 5 => 6.7, - 6 => 0, // Rocket - 7 => 0, // Tip rockets - 8 => 6.7, - _ => 0 - }; + this.fuelWeight = EngineType.GetFuelWeightForEngineType((int)value); updateCapacities = true; updateQuantities = true; } diff --git a/OpenSky.Agent.UdpXPlane11/Models/WeightAndBalanceDataRef.cs b/OpenSky.Agent.UdpXPlane11/Models/WeightAndBalanceDataRef.cs index c178e51..513a736 100644 --- a/OpenSky.Agent.UdpXPlane11/Models/WeightAndBalanceDataRef.cs +++ b/OpenSky.Agent.UdpXPlane11/Models/WeightAndBalanceDataRef.cs @@ -152,21 +152,7 @@ private void DataRefUpdated(DataRefElement element, float value) if (element.DataRef.StartsWith(DataRefs.AircraftPropAcfEnType.DataRef)) { - this.FuelWeightPerGallon = (int)value switch - { - 0 => 6, // Recip carb - 1 => 6, // Recip injected - 2 => 6.7, // Free turbo deprecated - 3 => 0, // Electric engine - 4 => 6.7, // Lo Bypass Jet deprecated - 5 => 6.7, // Single spool jet - 6 => 0, // Rocket - 7 => 6.7, // Multi spool jet - 8 => 6.7, // Turbo Prop Fixed deprecated - 9 => 6.7, // Free turbo prop - 10 => 6.7, // Fixed turbo prop - _ => 0 - }; + this.FuelWeightPerGallon = EngineType.GetFuelWeightForEngineType((int)value); updateFuelValues = true; } diff --git a/OpenSky.Agent.UdpXPlane11/OpenSky.Agent.UdpXPlane11.csproj b/OpenSky.Agent.UdpXPlane11/OpenSky.Agent.UdpXPlane11.csproj index 53c5c4c..fa33700 100644 --- a/OpenSky.Agent.UdpXPlane11/OpenSky.Agent.UdpXPlane11.csproj +++ b/OpenSky.Agent.UdpXPlane11/OpenSky.Agent.UdpXPlane11.csproj @@ -62,6 +62,7 @@ + diff --git a/OpenSky.Agent.UdpXPlane11/Properties/AssemblyInfo.cs b/OpenSky.Agent.UdpXPlane11/Properties/AssemblyInfo.cs index 1772465..eeddf67 100644 --- a/OpenSky.Agent.UdpXPlane11/Properties/AssemblyInfo.cs +++ b/OpenSky.Agent.UdpXPlane11/Properties/AssemblyInfo.cs @@ -12,10 +12,10 @@ [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("OpenSky")] [assembly: AssemblyProduct("OpenSky")] -[assembly: AssemblyCopyright("OpenSky project 2021-2022")] +[assembly: AssemblyCopyright("OpenSky project 2021-2023")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] [assembly: Guid("dfbda2b8-5775-4766-be86-d729fcf20de1")] -[assembly: AssemblyVersion("0.5.0")] -[assembly: AssemblyFileVersion("0.5.0")] \ No newline at end of file +[assembly: AssemblyVersion("0.5.4")] +[assembly: AssemblyFileVersion("0.5.4")] \ No newline at end of file diff --git a/OpenSky.Agent/Properties/AssemblyInfo.cs b/OpenSky.Agent/Properties/AssemblyInfo.cs index ffd6907..bc43d99 100644 --- a/OpenSky.Agent/Properties/AssemblyInfo.cs +++ b/OpenSky.Agent/Properties/AssemblyInfo.cs @@ -21,8 +21,8 @@ [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] [assembly: ThemeInfo(ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)] -[assembly: AssemblyVersion("0.5.3")] -[assembly: AssemblyFileVersion("0.5.3")] +[assembly: AssemblyVersion("0.5.4")] +[assembly: AssemblyFileVersion("0.5.4")] // This allows us to detect debug mode in XAML #if DEBUG diff --git a/OpenSky.Agent/Views/AircraftTypes.xaml b/OpenSky.Agent/Views/AircraftTypes.xaml index c8f8c7e..fa518ea 100644 --- a/OpenSky.Agent/Views/AircraftTypes.xaml +++ b/OpenSky.Agent/Views/AircraftTypes.xaml @@ -423,8 +423,8 @@ Minimum runwaylength in feet Is variant of Next version - Minimum price - Maximum price + Minimum price~50% of list + Maximum price~110% of list Max payload Δ lbs Comments @@ -561,8 +561,8 @@ Manual loading? Minimum runwaylength in feet Is variant of - Minimum price - Maximum price + Minimum price~50% of list + Maximum price~110% of list Max payload Δ lbs Comments diff --git a/OpenSky.Agent/Views/Models/AircraftTypesViewModel.cs b/OpenSky.Agent/Views/Models/AircraftTypesViewModel.cs index 76c605c..5c4c816 100644 --- a/OpenSky.Agent/Views/Models/AircraftTypesViewModel.cs +++ b/OpenSky.Agent/Views/Models/AircraftTypesViewModel.cs @@ -1322,6 +1322,7 @@ private void CancelAddAircraft() this.MinimumRunwayLength = 0; this.Comments = null; this.OverrideFuelType = FuelType.NotUsed; + this.EngineModel = null; this.aircraftTypeBeingUpdated = null; } diff --git a/changelog.txt b/changelog.txt index 25a27cd..f74b397 100644 --- a/changelog.txt +++ b/changelog.txt @@ -2,6 +2,12 @@ OpenSky Flight Tracking Agent Changelog ====================================================================================== +-------------------------------------------------------------------------------------- +Version 0.5.4 (ALPHA5) +-------------------------------------------------------------------------------------- +- Fixed and centralized all XP engine type datarefs now to solve flight tracking and + aircraft type issues + -------------------------------------------------------------------------------------- Version 0.5.3 (ALPHA5) -------------------------------------------------------------------------------------- From 5cb9d8f7dcdfab75b0a2f400500e20fce6850358 Mon Sep 17 00:00:00 2001 From: "sushi.at" Date: Fri, 24 Nov 2023 22:41:20 +0000 Subject: [PATCH 2/2] Restored functionality that adds OpenSky username to flight log xml files --- .../Simulator.SaveLoadXML.cs | 2 +- OpenSky.Agent.Simulator/Simulator.cs | 7 ++ .../Views/Models/StartupViewModel.cs | 69 +++++++++++-------- changelog.txt | 1 + 4 files changed, 51 insertions(+), 28 deletions(-) diff --git a/OpenSky.Agent.Simulator/Simulator.SaveLoadXML.cs b/OpenSky.Agent.Simulator/Simulator.SaveLoadXML.cs index a05e8f3..560e68f 100644 --- a/OpenSky.Agent.Simulator/Simulator.SaveLoadXML.cs +++ b/OpenSky.Agent.Simulator/Simulator.SaveLoadXML.cs @@ -64,7 +64,7 @@ private XElement GenerateSaveFile() { Agent = AgentIdentifier, AgentVersion = Assembly.GetExecutingAssembly().GetName().Version.ToString(), - OpenSkyUser = "TODO", //UserSessionService.Instance.Username, TODO restore/workaround + OpenSkyUser = this.OpenSkyUserName ?? "Unknown", LocalTimeZone = TimeZoneInfo.Local.BaseUtcOffset.TotalHours, TrackingStarted = this.trackingStarted ?? DateTime.MinValue, TrackingStopped = DateTime.UtcNow, diff --git a/OpenSky.Agent.Simulator/Simulator.cs b/OpenSky.Agent.Simulator/Simulator.cs index 42b973a..870396d 100644 --- a/OpenSky.Agent.Simulator/Simulator.cs +++ b/OpenSky.Agent.Simulator/Simulator.cs @@ -217,6 +217,13 @@ protected set } } + /// ------------------------------------------------------------------------------------------------- + /// + /// Gets or sets the OpenSky user name - let's the simulator interface know which user is logged in. + /// + /// ------------------------------------------------------------------------------------------------- + public string OpenSkyUserName { get; set; } + /// ------------------------------------------------------------------------------------------------- /// /// Gets the type of the simulator. diff --git a/OpenSky.Agent/Views/Models/StartupViewModel.cs b/OpenSky.Agent/Views/Models/StartupViewModel.cs index 77d4f63..88fa9c9 100644 --- a/OpenSky.Agent/Views/Models/StartupViewModel.cs +++ b/OpenSky.Agent/Views/Models/StartupViewModel.cs @@ -29,6 +29,8 @@ namespace OpenSky.Agent.Views.Models using OpenSky.Agent.Simulator.Tools; using OpenSkyApi; + + using Simulator = Simulator.Simulator; #if DEBUG #endif @@ -168,8 +170,8 @@ public StartupViewModel() } Instance = this; - Agent.Simulator.Simulator.Instance.PropertyChanged += this.SimConnectPropertyChanged; - Agent.Simulator.Simulator.Instance.FlightChanged += this.SimConnectFlightChanged; + Simulator.Instance.PropertyChanged += this.SimConnectPropertyChanged; + Simulator.Instance.FlightChanged += this.SimConnectFlightChanged; this.notificationIcon = this.greyIcon; if (!UserSessionService.Instance.IsUserLoggedIn) @@ -231,14 +233,27 @@ public StartupViewModel() { _ = UserSessionService.Instance.RefreshLinkedAccounts().Result; _ = UserSessionService.Instance.RefreshUserAccountOverview().Result; + Simulator.Instance.OpenSkyUserName = UserSessionService.Instance.Username; + } + else + { + Simulator.Instance.OpenSkyUserName = null; } UserSessionService.Instance.PropertyChanged += (sender, e) => { - if (e.PropertyName == nameof(UserSessionService.Instance.IsUserLoggedIn) && UserSessionService.Instance.IsUserLoggedIn) + if (e.PropertyName == nameof(UserSessionService.Instance.IsUserLoggedIn)) { - _ = UserSessionService.Instance.RefreshLinkedAccounts().Result; - _ = UserSessionService.Instance.RefreshUserAccountOverview().Result; + if (UserSessionService.Instance.IsUserLoggedIn) + { + _ = UserSessionService.Instance.RefreshLinkedAccounts().Result; + _ = UserSessionService.Instance.RefreshUserAccountOverview().Result; + Simulator.Instance.OpenSkyUserName = UserSessionService.Instance.Username; + } + else + { + Simulator.Instance.OpenSkyUserName = null; + } } }; @@ -253,24 +268,24 @@ public StartupViewModel() { if (result.Data.Id != Guid.Empty) { - if (Agent.Simulator.Simulator.Instance.Flight == null) + if (Simulator.Instance.Flight == null) { - Agent.Simulator.Simulator.Instance.Flight = result.Data; + Simulator.Instance.Flight = result.Data; } else { - if (Agent.Simulator.Simulator.Instance.Flight.Id != result.Data.Id) + if (Simulator.Instance.Flight.Id != result.Data.Id) { // Different flight from current one? - Agent.Simulator.Simulator.Instance.StopTracking(true); + Simulator.Instance.StopTracking(true); } } } else { - if (Agent.Simulator.Simulator.Instance.Flight != null) + if (Simulator.Instance.Flight != null) { - Agent.Simulator.Simulator.Instance.Flight = null; + Simulator.Instance.Flight = null; } } } @@ -285,7 +300,7 @@ public StartupViewModel() } } - SleepScheduler.SleepFor(TimeSpan.FromSeconds(Agent.Simulator.Simulator.Instance.Flight == null ? 30 : 120)); + SleepScheduler.SleepFor(TimeSpan.FromSeconds(Simulator.Instance.Flight == null ? 30 : 120)); } }) { Name = "OpenSky.StartupViewModel.CheckForFlights" }.Start(); @@ -361,9 +376,9 @@ private void SimConnectFlightChanged(object sender, Flight e) /// ------------------------------------------------------------------------------------------------- private void SimConnectPropertyChanged(object sender, PropertyChangedEventArgs e) { - if (e.PropertyName is nameof(Agent.Simulator.Simulator.Connected) or nameof(Agent.Simulator.Simulator.Instance.TrackingStatus) or nameof(Agent.Simulator.Simulator.Instance.IsPaused) or nameof(Agent.Simulator.Simulator.Instance.Flight) or nameof(Agent.Simulator.Simulator.Instance.FlightPhase)) + if (e.PropertyName is nameof(Simulator.Connected) or nameof(Simulator.Instance.TrackingStatus) or nameof(Simulator.Instance.IsPaused) or nameof(Simulator.Instance.Flight) or nameof(Simulator.Instance.FlightPhase)) { - if (!Agent.Simulator.Simulator.Instance.Connected) + if (!Simulator.Instance.Connected) { this.redFlashing = false; this.NotificationIcon = this.greyIcon; @@ -382,9 +397,9 @@ private void SimConnectPropertyChanged(object sender, PropertyChangedEventArgs e } else { - if (Agent.Simulator.Simulator.Instance.TrackingStatus is TrackingStatus.NotTracking or TrackingStatus.Preparing or TrackingStatus.Resuming) + if (Simulator.Instance.TrackingStatus is TrackingStatus.NotTracking or TrackingStatus.Preparing or TrackingStatus.Resuming) { - if (Agent.Simulator.Simulator.Instance.Flight == null) + if (Simulator.Instance.Flight == null) { this.redFlashing = false; this.NotificationIcon = this.openSkyIcon; @@ -405,12 +420,12 @@ private void SimConnectPropertyChanged(object sender, PropertyChangedEventArgs e { this.redFlashing = false; this.NotificationIcon = this.openSkyIcon; - this.NotificationStatusString = $"OpenSky is preparing to track flight {Agent.Simulator.Simulator.Instance.Flight?.FullFlightNumber}"; + this.NotificationStatusString = $"OpenSky is preparing to track flight {Simulator.Instance.Flight?.FullFlightNumber}"; this.DiscordRpcClient?.SetPresence(new RichPresence { - State = Agent.Simulator.Simulator.Instance.TrackingStatus.ToString(), - Details = $"Preparing flight {Agent.Simulator.Simulator.Instance.Flight?.FullFlightNumber}", + State = Simulator.Instance.TrackingStatus.ToString(), + Details = $"Preparing flight {Simulator.Instance.Flight?.FullFlightNumber}", Assets = new Assets { LargeImageKey = "openskylogo512", @@ -419,16 +434,16 @@ private void SimConnectPropertyChanged(object sender, PropertyChangedEventArgs e }); } } - else if (Agent.Simulator.Simulator.Instance.IsPaused) + else if (Simulator.Instance.IsPaused) { this.redFlashing = false; this.NotificationIcon = this.pauseIcon; - this.NotificationStatusString = $"OpenSky tracking and your flight {Agent.Simulator.Simulator.Instance.Flight?.FullFlightNumber} are paused"; + this.NotificationStatusString = $"OpenSky tracking and your flight {Simulator.Instance.Flight?.FullFlightNumber} are paused"; this.DiscordRpcClient?.SetPresence(new RichPresence { - State = $"Paused, {Agent.Simulator.Simulator.Instance.FlightPhase}", - Details = $"Tracking flight {Agent.Simulator.Simulator.Instance.Flight?.FullFlightNumber}", + State = $"Paused, {Simulator.Instance.FlightPhase}", + Details = $"Tracking flight {Simulator.Instance.Flight?.FullFlightNumber}", Assets = new Assets { LargeImageKey = "openskylogo512", @@ -442,12 +457,12 @@ private void SimConnectPropertyChanged(object sender, PropertyChangedEventArgs e { this.NotificationIcon = this.redIcon; this.redFlashing = true; - this.NotificationStatusString = $"OpenSky is tracking your flight {Agent.Simulator.Simulator.Instance.Flight?.FullFlightNumber}"; + this.NotificationStatusString = $"OpenSky is tracking your flight {Simulator.Instance.Flight?.FullFlightNumber}"; this.DiscordRpcClient?.SetPresence(new RichPresence { - State = $"Recording, {Agent.Simulator.Simulator.Instance.FlightPhase}", - Details = $"Tracking flight {Agent.Simulator.Simulator.Instance.Flight?.FullFlightNumber}", + State = $"Recording, {Simulator.Instance.FlightPhase}", + Details = $"Tracking flight {Simulator.Instance.Flight?.FullFlightNumber}", Assets = new Assets { LargeImageKey = "openskylogo512", @@ -701,7 +716,7 @@ private void Quit() { UpdateGUIDelegate cleanUp = () => { - Agent.Simulator.Simulator.Instance.Close(); + Simulator.Instance.Close(); SleepScheduler.Shutdown(); this.NotificationVisibility = Visibility.Collapsed; this.DiscordRpcClient.Dispose(); diff --git a/changelog.txt b/changelog.txt index f74b397..a4e8185 100644 --- a/changelog.txt +++ b/changelog.txt @@ -7,6 +7,7 @@ Version 0.5.4 (ALPHA5) -------------------------------------------------------------------------------------- - Fixed and centralized all XP engine type datarefs now to solve flight tracking and aircraft type issues +- Restored functionality that adds OpenSky username to flight log xml files -------------------------------------------------------------------------------------- Version 0.5.3 (ALPHA5)