Skip to content

Commit

Permalink
Support changes made to DeepSkyObject in 2.0 beta 50
Browse files Browse the repository at this point in the history
  • Loading branch information
daleghent committed Mar 13, 2022
1 parent 30369db commit 895e9e7
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 26 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Ground Station

## 1.11.0.0 - 2022-03-13
* Updated to support changes to DSO containers in NINA 2.0 beta 50
* Minimum supported NINA version is now 2.0 Beta 50

## 1.10.6.0 - 2022-01-30
* Fixed tripping over a null reference if the failing entity's Name or Category are not available
* Minimum supported NINA version is now 2.0 Beta 37
Expand Down
33 changes: 17 additions & 16 deletions Ground Station.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -178,37 +178,37 @@
<Version>3.1.1</Version>
</PackageReference>
<PackageReference Include="NINA.Astrometry">
<Version>2.0.0.2037-beta</Version>
<Version>2.0.0.2050-preview3</Version>
</PackageReference>
<PackageReference Include="NINA.Core">
<Version>2.0.0.2037-beta</Version>
<Version>2.0.0.2050-preview3</Version>
</PackageReference>
<PackageReference Include="NINA.Equipment">
<Version>2.0.0.2037-beta</Version>
<Version>2.0.0.2050-preview3</Version>
</PackageReference>
<PackageReference Include="NINA.Image">
<Version>2.0.0.2037-beta</Version>
<Version>2.0.0.2050-preview3</Version>
</PackageReference>
<PackageReference Include="NINA.MGEN">
<Version>2.0.0.2037-beta</Version>
<Version>2.0.0.2050-preview3</Version>
</PackageReference>
<PackageReference Include="NINA.PlateSolving">
<Version>2.0.0.2037-beta</Version>
<Version>2.0.0.2050-preview3</Version>
</PackageReference>
<PackageReference Include="NINA.Plugin">
<Version>2.0.0.2037-beta</Version>
<Version>2.0.0.2050-preview3</Version>
</PackageReference>
<PackageReference Include="NINA.Profile">
<Version>2.0.0.2037-beta</Version>
<Version>2.0.0.2050-preview3</Version>
</PackageReference>
<PackageReference Include="NINA.Sequencer">
<Version>2.0.0.2037-beta</Version>
<Version>2.0.0.2050-preview3</Version>
</PackageReference>
<PackageReference Include="NINA.WPF.Base">
<Version>2.0.0.2037-beta</Version>
<Version>2.0.0.2050-preview3</Version>
</PackageReference>
<PackageReference Include="NINACustomControlLibrary">
<Version>2.0.0.2037-beta</Version>
<Version>2.0.0.2050-preview3</Version>
</PackageReference>
<PackageReference Include="PushoverNET">
<Version>1.0.28</Version>
Expand All @@ -222,14 +222,15 @@
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>if not exist "%25localappdata%25\NINA\Plugins" (
echo "Creating $(PlatformName) Plugins folder"
mkdir "%25localappdata%25\NINA\Plugins"
<PostBuildEvent>
if not exist "%25localappdata%25\NINA\Plugins" (
echo "Creating $(PlatformName) Plugins folder"
mkdir "%25localappdata%25\NINA\Plugins"
)

if not exist "%25localappdata%25\NINA\Plugin\$(TargetName)" (
echo "Creating $(PlatformName) Plugins $(TargetName) folder"
mkdir "%25localappdata%25\NINA\Plugins\$(TargetName)"
echo "Creating $(PlatformName) Plugins $(TargetName) folder"
mkdir "%25localappdata%25\NINA\Plugins\$(TargetName)"
)

echo "Copying $(PlatformName) $(TargetFileName)"
Expand Down
10 changes: 5 additions & 5 deletions Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

// [MANDATORY] The assembly versioning
//Should be incremented for each new release build of a plugin
[assembly: AssemblyVersion("1.10.6.0")]
[assembly: AssemblyFileVersion("1.10.6.0")]
[assembly: AssemblyVersion("1.11.0.0")]
[assembly: AssemblyFileVersion("1.11.0.0")]

// [MANDATORY] The name of your plugin
[assembly: AssemblyTitle("Ground Station")]
Expand All @@ -20,10 +20,10 @@
[assembly: AssemblyCompany("Dale Ghent")]
// The product name that this plugin is part of
[assembly: AssemblyProduct("Ground Station")]
[assembly: AssemblyCopyright("Copyright © 2021 Dale Ghent")]
[assembly: AssemblyCopyright("Copyright © 2022 Dale Ghent")]

// The minimum Version of N.I.N.A. that this plugin is compatible with
[assembly: AssemblyMetadata("MinimumApplicationVersion", "2.0.0.2037")]
[assembly: AssemblyMetadata("MinimumApplicationVersion", "2.0.0.2050")]

// The license your plugin code is using
[assembly: AssemblyMetadata("License", "MPL-2.0")]
Expand Down Expand Up @@ -87,4 +87,4 @@ Information about your session or any failures may be inserted into the messages
// [Unused]
[assembly: AssemblyTrademark("")]
// [Unused]
[assembly: AssemblyCulture("")]
[assembly: AssemblyCulture("")]
13 changes: 8 additions & 5 deletions Utilities/Utilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ This Source Code Form is subject to the terms of the Mozilla Public
#endregion "copyright"

using NINA.Astrometry;
using NINA.Astrometry.Interfaces;
using NINA.Core.Enum;
using NINA.Core.Utility;
using NINA.Sequencer.Container;
Expand All @@ -30,7 +31,7 @@ internal class Utilities {
internal const int cancelTimeout = 10; // in seconds

internal static string ResolveTokens(string text, ISequenceItem sequenceItem = null, bool urlEncode = false) {
DeepSkyObject target = null;
IDeepSkyObject target = null;

if (sequenceItem != null) {
target = FindDsoInfo(sequenceItem.Parent);
Expand Down Expand Up @@ -110,14 +111,16 @@ internal static string ResolveFailureTokens(string text, FailedItem failedItem,
return text;
}

public static DeepSkyObject FindDsoInfo(ISequenceContainer container) {
DeepSkyObject target = null;
public static IDeepSkyObject FindDsoInfo(ISequenceContainer container) {
IDeepSkyObject target = null;
ISequenceContainer acontainer = container;

while (acontainer != null) {
if (acontainer is IDeepSkyObjectContainer dsoContainer) {
target = dsoContainer.Target.DeepSkyObject;
break;
if (dsoContainer.Target.DeepSkyObject != null) {
target = dsoContainer.Target.DeepSkyObject;
break;
}
}

acontainer = acontainer.Parent;
Expand Down

0 comments on commit 895e9e7

Please sign in to comment.