Compare commits
87 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8713154e84 | |||
| 75b6f0b4b4 | |||
| 032fb2e8a8 | |||
| a5773aaaa9 | |||
| f88ad13f0d | |||
| 9dde0d9e81 | |||
| acc935248b | |||
| cdf1066e4e | |||
| f57a73843a | |||
| b0ef75ae66 | |||
| 136ccc8fa9 | |||
| e9491da707 | |||
| db06002ebf | |||
| ca1b7f8883 | |||
| 14b5651795 | |||
| 1186924761 | |||
| 1616ddbc21 | |||
| 79a404e78a | |||
| 9cd547c204 | |||
| f140e8aee1 | |||
| a9f57b7ad2 | |||
| c7fa7ab095 | |||
| 778b36b7f5 | |||
| 447ff3ace9 | |||
| c848ebd9be | |||
| d9acad1caa | |||
| f827a1ea3a | |||
| 26b94de48c | |||
| 779d314748 | |||
| 199b068e94 | |||
| e8f3b00912 | |||
| 579ea164f8 | |||
| 902d6bbc6e | |||
| 927d6bce47 | |||
| 65afa07125 | |||
| 58992c2947 | |||
| 1297b5eb78 | |||
| cd8330196e | |||
| 9042c76d48 | |||
| 4126b2ee44 | |||
| ca0028f08d | |||
| a59ecaf21d | |||
| 1b73bb62b6 | |||
| c34ed41ddf | |||
| d0406b32dd | |||
| b33d1741c4 | |||
| d728dbe272 | |||
| 47d0a047a5 | |||
| 83dd7d87f0 | |||
| 03f2022f2f | |||
| 89600c463b | |||
| 92ab807eae | |||
| a2fcaac2a9 | |||
| da4e4fd81a | |||
| 4266139429 | |||
| 1dc7d7142a | |||
| b9f1dd9d61 | |||
| 6c25373d7f | |||
| c19115f252 | |||
| 9c4329deed | |||
| a563a77554 | |||
| f9792b22bc | |||
| 8d097fefe1 | |||
| 71ed5cc58b | |||
| d6cec4d63e | |||
| 139191a1ce | |||
| 946fb4b141 | |||
| 3d47e03240 | |||
| 855a21122a | |||
| 2c7de157e8 | |||
| 1e59d5610e | |||
| bd8476e11a | |||
| 3e00398af0 | |||
| 2ab9cfb9c8 | |||
| 894b78d9f1 | |||
| b9522ae2a2 | |||
| 07665b7617 | |||
| 6130cb6d64 | |||
| d925312403 | |||
| 5a18577552 | |||
| c7f1a4272f | |||
| 6601fa6205 | |||
| e2abda2d14 | |||
| 97810b5575 | |||
| 1185770a94 | |||
| 25d88b0609 | |||
| 85c77787ce |
+1
-1
@@ -109,6 +109,7 @@ _TeamCity*
|
||||
_NCrunch_*
|
||||
.*crunch*.local.xml
|
||||
nCrunchTemp_*
|
||||
*ncrunchsolution.user
|
||||
|
||||
# MightyMoose
|
||||
*.mm.*
|
||||
@@ -217,5 +218,4 @@ _Pvt_Extensions
|
||||
|
||||
# nCrunch items
|
||||
*.ncrunchsolution
|
||||
*.DotSettings
|
||||
*.ncrunchproject
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\packages\NUnit.3.12.0\build\NUnit.props" Condition="Exists('..\packages\NUnit.3.12.0\build\NUnit.props')" />
|
||||
<Import Project="..\packages\NUnit.3.13.0\build\NUnit.props" Condition="Exists('..\packages\NUnit.3.13.0\build\NUnit.props')" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
@@ -54,22 +54,25 @@
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Castle.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Castle.Core.4.4.0\lib\net45\Castle.Core.dll</HintPath>
|
||||
<HintPath>..\packages\Castle.Core.4.4.1\lib\net45\Castle.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Moq, Version=4.13.0.0, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Moq.4.13.0\lib\net45\Moq.dll</HintPath>
|
||||
<Reference Include="JetBrains.Annotations, Version=2020.3.0.0, Culture=neutral, PublicKeyToken=1010a0d8d6380325, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\JetBrains.Annotations.2020.3.0\lib\net20\JetBrains.Annotations.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="nunit.framework, Version=3.12.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NUnit.3.12.0\lib\net45\nunit.framework.dll</HintPath>
|
||||
<Reference Include="Moq, Version=4.15.0.0, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Moq.4.15.2\lib\net45\Moq.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="nunit.framework, Version=3.13.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NUnit.3.13.0\lib\net45\nunit.framework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.5.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.6.0\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.5.0.0\lib\net45\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.3\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll</HintPath>
|
||||
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
@@ -97,6 +100,6 @@
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\NUnit.3.12.0\build\NUnit.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NUnit.3.12.0\build\NUnit.props'))" />
|
||||
<Error Condition="!Exists('..\packages\NUnit.3.13.0\build\NUnit.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NUnit.3.13.0\build\NUnit.props'))" />
|
||||
</Target>
|
||||
</Project>
|
||||
@@ -18,14 +18,14 @@ namespace AstroMath.UnitTests
|
||||
[Test]
|
||||
public void DegreesToRadians()
|
||||
{
|
||||
var radians = _astroMath.DegreesToRadians(90);
|
||||
var radians = 90.0.DegreesToRadians();
|
||||
Assert.That(radians, Is.EqualTo(1.5707963267948966));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void RadiansToDegrees()
|
||||
{
|
||||
var degrees = _astroMath.RadiansToDegrees(1.5707963267948966);
|
||||
var degrees = 1.5707963267948966.RadiansToDegrees();
|
||||
Assert.That(degrees, Is.EqualTo(90));
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace AstroMath.UnitTests
|
||||
public void DateTimeToDecimalHours_book()
|
||||
{
|
||||
DateTime dateTime = new DateTime(2019, 05, 18, 18, 31, 27, DateTimeKind.Utc);
|
||||
var decimalHours = _astroMath.DateTimeToDecimalHours(dateTime);
|
||||
var decimalHours = dateTime.DateTimeToDecimalHours();
|
||||
|
||||
Assert.That(decimalHours, Is.EqualTo(18.524166666666666));
|
||||
}
|
||||
@@ -43,7 +43,7 @@ namespace AstroMath.UnitTests
|
||||
public void DateTimeToDecimalHours()
|
||||
{
|
||||
DateTime dateTime = new DateTime(2019, 05, 18, 22, 26, 15, DateTimeKind.Utc);
|
||||
var decimalHours = _astroMath.DateTimeToDecimalHours(dateTime);
|
||||
var decimalHours = dateTime.DateTimeToDecimalHours();
|
||||
|
||||
Assert.That(decimalHours, Is.EqualTo(22.4375));
|
||||
}
|
||||
@@ -52,7 +52,7 @@ namespace AstroMath.UnitTests
|
||||
public void UTtoGST_book()
|
||||
{
|
||||
DateTime dateTime = new DateTime(1980, 04, 22, 14, 36, 51, 670, DateTimeKind.Utc);
|
||||
double gst = _astroMath.UTtoGst(dateTime);
|
||||
double gst = dateTime.UTtoGst();
|
||||
|
||||
Assert.That(gst, Is.EqualTo(4.667932706211154));
|
||||
}
|
||||
@@ -61,7 +61,7 @@ namespace AstroMath.UnitTests
|
||||
public void UTtoGst()
|
||||
{
|
||||
DateTime dateTime = new DateTime(2019, 05, 18, 22, 26, 15, DateTimeKind.Utc);
|
||||
double gst = _astroMath.UTtoGst(dateTime);
|
||||
double gst = dateTime.UTtoGst();
|
||||
|
||||
Assert.That(gst, Is.EqualTo(14.191879687876451));
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.5.0" newVersion="4.0.5.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Castle.Core" version="4.4.0" targetFramework="net472" />
|
||||
<package id="Moq" version="4.13.0" targetFramework="net472" />
|
||||
<package id="NUnit" version="3.12.0" targetFramework="net472" />
|
||||
<package id="System.Runtime.CompilerServices.Unsafe" version="4.6.0" targetFramework="net472" />
|
||||
<package id="System.Threading.Tasks.Extensions" version="4.5.3" targetFramework="net472" />
|
||||
<package id="Castle.Core" version="4.4.1" targetFramework="net472" />
|
||||
<package id="JetBrains.Annotations" version="2020.3.0" targetFramework="net472" />
|
||||
<package id="Moq" version="4.15.2" targetFramework="net472" />
|
||||
<package id="NUnit" version="3.13.0" targetFramework="net472" />
|
||||
<package id="System.Runtime.CompilerServices.Unsafe" version="5.0.0" targetFramework="net472" />
|
||||
<package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net472" />
|
||||
</packages>
|
||||
@@ -59,6 +59,9 @@
|
||||
<ItemGroup>
|
||||
<Reference Include="ASCOM.DeviceInterfaces, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL" />
|
||||
<Reference Include="ASCOM.DriverAccess, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL" />
|
||||
<Reference Include="JetBrains.Annotations, Version=2020.3.0.0, Culture=neutral, PublicKeyToken=1010a0d8d6380325, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\JetBrains.Annotations.2020.3.0\lib\net20\JetBrains.Annotations.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
@@ -72,6 +75,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="JetBrains.Annotations" version="2020.3.0" targetFramework="net45" />
|
||||
</packages>
|
||||
@@ -28,7 +28,8 @@ namespace Meade.net.Focuser.UnitTests
|
||||
TraceLogger = false,
|
||||
ComPort = "TestCom1",
|
||||
GuideRateArcSecondsPerSecond = 1.23,
|
||||
Precision = "Unchanged"
|
||||
Precision = "Unchanged",
|
||||
GuidingStyle = "Auto"
|
||||
};
|
||||
|
||||
_utilMock = new Mock<IUtil>();
|
||||
@@ -181,7 +182,7 @@ namespace Meade.net.Focuser.UnitTests
|
||||
_sharedResourcesWrapperMock.Setup(x => x.FirmwareVersion).Returns(firmware);
|
||||
_focuser.Connected = true;
|
||||
|
||||
_sharedResourcesWrapperMock.Verify(x => x.Connect("Serial", It.IsAny<string>()), Times.Once);
|
||||
_sharedResourcesWrapperMock.Verify(x => x.Connect("Serial", It.IsAny<string>(), It.IsAny<ITraceLogger>()), Times.Once);
|
||||
}
|
||||
|
||||
|
||||
@@ -189,20 +190,20 @@ namespace Meade.net.Focuser.UnitTests
|
||||
public void Connected_Set_SettingTrueWhenTrue_ThenDoesNothing()
|
||||
{
|
||||
ConnectFocuser();
|
||||
_sharedResourcesWrapperMock.Verify(x => x.Connect(It.IsAny<string>(), It.IsAny<string>()), Times.Once);
|
||||
_sharedResourcesWrapperMock.Verify(x => x.Connect(It.IsAny<string>(), It.IsAny<string>(), It.IsAny<ITraceLogger>()), Times.Once);
|
||||
|
||||
//act
|
||||
_focuser.Connected = true;
|
||||
|
||||
//assert
|
||||
_sharedResourcesWrapperMock.Verify(x => x.Connect(It.IsAny<string>(), It.IsAny<string>()), Times.Once);
|
||||
_sharedResourcesWrapperMock.Verify(x => x.Connect(It.IsAny<string>(), It.IsAny<string>(), It.IsAny<ITraceLogger>()), Times.Once);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Connected_Set_SettingFalseWhenTrue_ThenDisconnects()
|
||||
{
|
||||
ConnectFocuser();
|
||||
_sharedResourcesWrapperMock.Verify(x => x.Connect(It.IsAny<string>(), It.IsAny<string>()), Times.Once);
|
||||
_sharedResourcesWrapperMock.Verify(x => x.Connect(It.IsAny<string>(), It.IsAny<string>(), It.IsAny<ITraceLogger>()), Times.Once);
|
||||
|
||||
//act
|
||||
_focuser.Connected = false;
|
||||
@@ -313,7 +314,6 @@ namespace Meade.net.Focuser.UnitTests
|
||||
_focuser.Halt();
|
||||
|
||||
_sharedResourcesWrapperMock.Verify( x => x.SendBlind(":FQ#"), Times.AtLeastOnce);
|
||||
_utilMock.Verify( x => x.WaitForMilliseconds(250), Times.AtLeastOnce);
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -395,27 +395,58 @@ namespace Meade.net.Focuser.UnitTests
|
||||
[TestCase(-200)]
|
||||
public void Move_WhenIncrementIsNot0_ThenMovesFocuserAndStopsFocuser( int position)
|
||||
{
|
||||
_profileProperties.BacklashCompensation = 0;
|
||||
|
||||
ConnectFocuser();
|
||||
|
||||
_focuser.Move(position);
|
||||
|
||||
if (position < 0)
|
||||
{
|
||||
_sharedResourcesWrapperMock.Verify( x => x.SendBlind("#:F-#"), Times.AtLeastOnce);
|
||||
_sharedResourcesWrapperMock.Verify(x => x.SendBlind("#:F+#"), Times.Never);
|
||||
_sharedResourcesWrapperMock.Verify( x => x.SendBlind(":F-#"), Times.Once);
|
||||
_sharedResourcesWrapperMock.Verify(x => x.SendBlind(":F+#"), Times.Never);
|
||||
}
|
||||
else
|
||||
{
|
||||
_sharedResourcesWrapperMock.Verify(x => x.SendBlind("#:F-#"), Times.Never);
|
||||
_sharedResourcesWrapperMock.Verify(x => x.SendBlind("#:F+#"), Times.AtLeastOnce);
|
||||
_sharedResourcesWrapperMock.Verify(x => x.SendBlind(":F-#"), Times.Never);
|
||||
_sharedResourcesWrapperMock.Verify(x => x.SendBlind(":F+#"), Times.Once);
|
||||
}
|
||||
|
||||
_sharedResourcesWrapperMock.Verify( x => x.Lock(It.IsAny<Action>()), Times.Once);
|
||||
|
||||
_utilMock.Verify(x => x.WaitForMilliseconds(250), Times.AtLeastOnce);
|
||||
|
||||
_utilMock.Verify(x => x.WaitForMilliseconds(Math.Abs(position)), Times.Once);
|
||||
_utilMock.Verify(x => x.WaitForMilliseconds(Math.Abs(_profileProperties.BacklashCompensation)), Times.Never);
|
||||
_utilMock.Verify(x => x.WaitForMilliseconds(100), Times.Once());
|
||||
_utilMock.Verify(x => x.WaitForMilliseconds(1000), Times.Once());
|
||||
}
|
||||
|
||||
[TestCase(200)]
|
||||
[TestCase(-200)]
|
||||
public void Move_WhenIncrementIsNot0_ThenMovesFocuserAndStopsFocuserWithBacklashCompensation(int position)
|
||||
{
|
||||
_profileProperties.BacklashCompensation = 3000;
|
||||
|
||||
ConnectFocuser();
|
||||
|
||||
_focuser.Move(position);
|
||||
|
||||
if (position < 0)
|
||||
{
|
||||
_sharedResourcesWrapperMock.Verify(x => x.SendBlind(":F-#"), Times.Once);
|
||||
_sharedResourcesWrapperMock.Verify(x => x.SendBlind(":F+#"), Times.Never);
|
||||
_utilMock.Verify(x => x.WaitForMilliseconds(Math.Abs(position)), Times.Once);
|
||||
_utilMock.Verify(x => x.WaitForMilliseconds(Math.Abs(_profileProperties.BacklashCompensation)), Times.Never);
|
||||
_utilMock.Verify(x => x.WaitForMilliseconds(100), Times.Exactly(1));
|
||||
}
|
||||
else
|
||||
{
|
||||
_sharedResourcesWrapperMock.Verify(x => x.SendBlind(":F-#"), Times.Once);
|
||||
_sharedResourcesWrapperMock.Verify(x => x.SendBlind(":F+#"), Times.Once);
|
||||
_utilMock.Verify(x => x.WaitForMilliseconds(Math.Abs(position) + _profileProperties.BacklashCompensation), Times.Once);
|
||||
_utilMock.Verify(x => x.WaitForMilliseconds(_profileProperties.BacklashCompensation), Times.Once);
|
||||
_utilMock.Verify(x => x.WaitForMilliseconds(100), Times.Exactly(2));
|
||||
}
|
||||
|
||||
_sharedResourcesWrapperMock.Verify(x => x.Lock(It.IsAny<Action>()), Times.Once);
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\packages\NUnit.3.12.0\build\NUnit.props" Condition="Exists('..\packages\NUnit.3.12.0\build\NUnit.props')" />
|
||||
<Import Project="..\packages\NUnit.3.13.0\build\NUnit.props" Condition="Exists('..\packages\NUnit.3.13.0\build\NUnit.props')" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
@@ -36,55 +36,58 @@
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="ASCOM.Astrometry, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Astrometry.dll</HintPath>
|
||||
<HintPath>..\packages\ASCOM.Platform.6.5.1\lib\net40\ASCOM.Astrometry.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.Attributes, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Attributes.dll</HintPath>
|
||||
<HintPath>..\packages\ASCOM.Platform.6.5.1\lib\net40\ASCOM.Attributes.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.Cache, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Cache.dll</HintPath>
|
||||
<HintPath>..\packages\ASCOM.Platform.6.5.1\lib\net40\ASCOM.Cache.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.Controls, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Controls.dll</HintPath>
|
||||
<HintPath>..\packages\ASCOM.Platform.6.5.1\lib\net40\ASCOM.Controls.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.DeviceInterfaces, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.DeviceInterfaces.dll</HintPath>
|
||||
<HintPath>..\packages\ASCOM.Platform.6.5.1\lib\net40\ASCOM.DeviceInterfaces.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.DriverAccess, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.DriverAccess.dll</HintPath>
|
||||
<HintPath>..\packages\ASCOM.Platform.6.5.1\lib\net40\ASCOM.DriverAccess.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.Exceptions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Exceptions.dll</HintPath>
|
||||
<HintPath>..\packages\ASCOM.Platform.6.5.1\lib\net40\ASCOM.Exceptions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.Internal.Extensions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Internal.Extensions.dll</HintPath>
|
||||
<HintPath>..\packages\ASCOM.Platform.6.5.1\lib\net40\ASCOM.Internal.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.SettingsProvider, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.SettingsProvider.dll</HintPath>
|
||||
<HintPath>..\packages\ASCOM.Platform.6.5.1\lib\net40\ASCOM.SettingsProvider.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.Utilities, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Utilities.dll</HintPath>
|
||||
<HintPath>..\packages\ASCOM.Platform.6.5.1\lib\net40\ASCOM.Utilities.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.Utilities.Video, Version=6.1.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Utilities.Video.dll</HintPath>
|
||||
<HintPath>..\packages\ASCOM.Platform.6.5.1\lib\net40\ASCOM.Utilities.Video.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Castle.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Castle.Core.4.4.0\lib\net45\Castle.Core.dll</HintPath>
|
||||
<HintPath>..\packages\Castle.Core.4.4.1\lib\net45\Castle.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Moq, Version=4.13.0.0, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Moq.4.13.0\lib\net45\Moq.dll</HintPath>
|
||||
<Reference Include="JetBrains.Annotations, Version=2020.3.0.0, Culture=neutral, PublicKeyToken=1010a0d8d6380325, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\JetBrains.Annotations.2020.3.0\lib\net20\JetBrains.Annotations.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="nunit.framework, Version=3.12.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NUnit.3.12.0\lib\net45\nunit.framework.dll</HintPath>
|
||||
<Reference Include="Moq, Version=4.15.0.0, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Moq.4.15.2\lib\net45\Moq.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="nunit.framework, Version=3.13.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NUnit.3.13.0\lib\net45\nunit.framework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.5.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.6.0\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.5.0.0\lib\net45\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.3\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll</HintPath>
|
||||
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
@@ -117,6 +120,6 @@
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\NUnit.3.12.0\build\NUnit.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NUnit.3.12.0\build\NUnit.props'))" />
|
||||
<Error Condition="!Exists('..\packages\NUnit.3.13.0\build\NUnit.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NUnit.3.13.0\build\NUnit.props'))" />
|
||||
</Target>
|
||||
</Project>
|
||||
@@ -8,7 +8,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.5.0" newVersion="4.0.5.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="ASCOM.Platform" version="6.4.2" targetFramework="net472" />
|
||||
<package id="Castle.Core" version="4.4.0" targetFramework="net472" />
|
||||
<package id="Moq" version="4.13.0" targetFramework="net472" />
|
||||
<package id="NUnit" version="3.12.0" targetFramework="net472" />
|
||||
<package id="System.Runtime.CompilerServices.Unsafe" version="4.6.0" targetFramework="net472" />
|
||||
<package id="System.Threading.Tasks.Extensions" version="4.5.3" targetFramework="net472" />
|
||||
<package id="ASCOM.Platform" version="6.5.1" targetFramework="net472" />
|
||||
<package id="Castle.Core" version="4.4.1" targetFramework="net472" />
|
||||
<package id="JetBrains.Annotations" version="2020.3.0" targetFramework="net472" />
|
||||
<package id="Moq" version="4.15.2" targetFramework="net472" />
|
||||
<package id="NUnit" version="3.13.0" targetFramework="net472" />
|
||||
<package id="System.Runtime.CompilerServices.Unsafe" version="5.0.0" targetFramework="net472" />
|
||||
<package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net472" />
|
||||
</packages>
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\packages\NUnit.3.12.0\build\NUnit.props" Condition="Exists('..\packages\NUnit.3.12.0\build\NUnit.props')" />
|
||||
<Import Project="..\packages\NUnit.3.13.0\build\NUnit.props" Condition="Exists('..\packages\NUnit.3.13.0\build\NUnit.props')" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
@@ -57,55 +57,58 @@
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="ASCOM.Astrometry, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Astrometry.dll</HintPath>
|
||||
<HintPath>..\packages\ASCOM.Platform.6.5.1\lib\net40\ASCOM.Astrometry.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.Attributes, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Attributes.dll</HintPath>
|
||||
<HintPath>..\packages\ASCOM.Platform.6.5.1\lib\net40\ASCOM.Attributes.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.Cache, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Cache.dll</HintPath>
|
||||
<HintPath>..\packages\ASCOM.Platform.6.5.1\lib\net40\ASCOM.Cache.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.Controls, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Controls.dll</HintPath>
|
||||
<HintPath>..\packages\ASCOM.Platform.6.5.1\lib\net40\ASCOM.Controls.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.DeviceInterfaces, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.DeviceInterfaces.dll</HintPath>
|
||||
<HintPath>..\packages\ASCOM.Platform.6.5.1\lib\net40\ASCOM.DeviceInterfaces.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.DriverAccess, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.DriverAccess.dll</HintPath>
|
||||
<HintPath>..\packages\ASCOM.Platform.6.5.1\lib\net40\ASCOM.DriverAccess.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.Exceptions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Exceptions.dll</HintPath>
|
||||
<HintPath>..\packages\ASCOM.Platform.6.5.1\lib\net40\ASCOM.Exceptions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.Internal.Extensions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Internal.Extensions.dll</HintPath>
|
||||
<HintPath>..\packages\ASCOM.Platform.6.5.1\lib\net40\ASCOM.Internal.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.SettingsProvider, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.SettingsProvider.dll</HintPath>
|
||||
<HintPath>..\packages\ASCOM.Platform.6.5.1\lib\net40\ASCOM.SettingsProvider.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.Utilities, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Utilities.dll</HintPath>
|
||||
<HintPath>..\packages\ASCOM.Platform.6.5.1\lib\net40\ASCOM.Utilities.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.Utilities.Video, Version=6.1.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Utilities.Video.dll</HintPath>
|
||||
<HintPath>..\packages\ASCOM.Platform.6.5.1\lib\net40\ASCOM.Utilities.Video.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Castle.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Castle.Core.4.4.0\lib\net45\Castle.Core.dll</HintPath>
|
||||
<HintPath>..\packages\Castle.Core.4.4.1\lib\net45\Castle.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Moq, Version=4.13.0.0, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Moq.4.13.0\lib\net45\Moq.dll</HintPath>
|
||||
<Reference Include="JetBrains.Annotations, Version=2020.3.0.0, Culture=neutral, PublicKeyToken=1010a0d8d6380325, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\JetBrains.Annotations.2020.3.0\lib\net20\JetBrains.Annotations.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="nunit.framework, Version=3.12.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NUnit.3.12.0\lib\net40\nunit.framework.dll</HintPath>
|
||||
<Reference Include="Moq, Version=4.15.0.0, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Moq.4.15.2\lib\net45\Moq.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="nunit.framework, Version=3.13.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NUnit.3.13.0\lib\net45\nunit.framework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.5.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.6.0\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.5.0.0\lib\net45\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.3\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll</HintPath>
|
||||
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
@@ -137,6 +140,6 @@
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\NUnit.3.12.0\build\NUnit.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NUnit.3.12.0\build\NUnit.props'))" />
|
||||
<Error Condition="!Exists('..\packages\NUnit.3.13.0\build\NUnit.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NUnit.3.13.0\build\NUnit.props'))" />
|
||||
</Target>
|
||||
</Project>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -4,7 +4,7 @@
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.5.0" newVersion="4.0.5.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="ASCOM.Platform" version="6.4.2" targetFramework="net472" />
|
||||
<package id="Castle.Core" version="4.4.0" targetFramework="net45" />
|
||||
<package id="Moq" version="4.13.0" targetFramework="net472" />
|
||||
<package id="NUnit" version="3.12.0" targetFramework="net40" requireReinstallation="true" />
|
||||
<package id="System.Runtime.CompilerServices.Unsafe" version="4.6.0" targetFramework="net472" />
|
||||
<package id="System.Threading.Tasks.Extensions" version="4.5.3" targetFramework="net472" />
|
||||
<package id="ASCOM.Platform" version="6.5.1" targetFramework="net472" />
|
||||
<package id="Castle.Core" version="4.4.1" targetFramework="net472" />
|
||||
<package id="JetBrains.Annotations" version="2020.3.0" targetFramework="net472" />
|
||||
<package id="Moq" version="4.15.2" targetFramework="net472" />
|
||||
<package id="NUnit" version="3.13.0" targetFramework="net472" />
|
||||
<package id="System.Runtime.CompilerServices.Unsafe" version="5.0.0" targetFramework="net472" />
|
||||
<package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net472" />
|
||||
</packages>
|
||||
@@ -0,0 +1,79 @@
|
||||
using System;
|
||||
using ASCOM.Utilities;
|
||||
|
||||
namespace ASCOM.Meade.net.AstroMaths
|
||||
{
|
||||
public static class AstroMathExtensions
|
||||
{
|
||||
public static double DegreesToRadians(this double degrees)
|
||||
{
|
||||
return (Math.PI / 180) * degrees;
|
||||
}
|
||||
|
||||
public static double RadiansToDegrees(this double radians)
|
||||
{
|
||||
double degrees = (180 / Math.PI) * radians;
|
||||
return degrees;
|
||||
}
|
||||
|
||||
public static double DateTimeToDecimalHours(this DateTime utcDateTime)
|
||||
{
|
||||
double sec = utcDateTime.Second;
|
||||
double min = utcDateTime.Minute;
|
||||
double hour = utcDateTime.Hour;
|
||||
|
||||
var a = Math.Abs(sec) / 60;
|
||||
var b = (Math.Abs(min) + a) / 60;
|
||||
var c = Math.Abs(hour) + b;
|
||||
|
||||
var d = c;
|
||||
|
||||
if ((hour < 0) || (min < 0) || (sec < 0))
|
||||
d = -c;
|
||||
|
||||
return d;
|
||||
}
|
||||
|
||||
public static double UTtoGst( this DateTime utcDateTime)
|
||||
{
|
||||
Util util = new Util();
|
||||
|
||||
var jd = util.DateUTCToJulian(utcDateTime) - 0.5;
|
||||
if ((jd % 1) <= 0.5)
|
||||
jd = Math.Floor(jd);
|
||||
else
|
||||
jd = Math.Floor(jd) + 0.5;
|
||||
|
||||
var s = jd - 2451545.0;
|
||||
var t = s / 36525.0;
|
||||
var t0 = 6.697374558 + (2400.051336 * t) + (0.000025862 * (t * t));
|
||||
|
||||
while (t0 < 0)
|
||||
{
|
||||
t0 += 24;
|
||||
}
|
||||
|
||||
while (t0 >= 24)
|
||||
{
|
||||
t0 -= 24;
|
||||
}
|
||||
|
||||
var ut = utcDateTime.DateTimeToDecimalHours();
|
||||
var a = ut * 1.002737909;
|
||||
|
||||
var t1 = t0 + a;
|
||||
|
||||
while (t1 < 0)
|
||||
{
|
||||
t1 += 24;
|
||||
}
|
||||
|
||||
while (t1 >= 24)
|
||||
{
|
||||
t1 -= 24;
|
||||
}
|
||||
|
||||
return t1;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using ASCOM.Utilities;
|
||||
|
||||
namespace ASCOM.Meade.net.AstroMaths
|
||||
{
|
||||
@@ -10,7 +9,7 @@ namespace ASCOM.Meade.net.AstroMaths
|
||||
public double RightAscensionToHourAngle(DateTime utcDateTime, double longitude, double rightAscension)
|
||||
{
|
||||
//var ut = DateTimeToDecimalHours( utcDateTime);
|
||||
var gst = UTtoGst( utcDateTime);
|
||||
var gst = utcDateTime.UTtoGst();
|
||||
var lst = GsTtoLst( gst, longitude);
|
||||
var raHours = rightAscension;
|
||||
var h1 = lst - raHours;
|
||||
@@ -24,7 +23,7 @@ namespace ASCOM.Meade.net.AstroMaths
|
||||
|
||||
private double HourAngleToRightAscension(DateTime utcDateTime, double longitude, double hourAngle )
|
||||
{
|
||||
var gst = UTtoGst(utcDateTime);
|
||||
var gst = utcDateTime.UTtoGst();
|
||||
var lst = GsTtoLst( gst, longitude);
|
||||
var raHours = hourAngle;
|
||||
var h1 = lst - raHours;
|
||||
@@ -39,17 +38,17 @@ namespace ASCOM.Meade.net.AstroMaths
|
||||
|
||||
public EquatorialCoordinates ConvertHozToEq( DateTime utcDateTime, double latitude, double longitude, HorizonCoordinates altAz)
|
||||
{
|
||||
var az = DegreesToRadians(altAz.Azimuth);
|
||||
var alt = DegreesToRadians(altAz.Altitude);
|
||||
var lat = DegreesToRadians(latitude);
|
||||
var az = altAz.Azimuth.DegreesToRadians();
|
||||
var alt = altAz.Altitude.DegreesToRadians();
|
||||
var lat = latitude.DegreesToRadians();
|
||||
|
||||
var sinDec = Math.Sin(alt) * Math.Sin(lat) + Math.Cos(alt) * Math.Cos(lat) * Math.Cos(az);
|
||||
var dec = RadiansToDegrees(Math.Asin(sinDec));
|
||||
var dec = Math.Asin(sinDec).RadiansToDegrees();
|
||||
|
||||
var y = -Math.Cos(alt) * Math.Cos(lat) * Math.Sin(az);
|
||||
var x = Math.Sin(alt) - Math.Sin(lat) * sinDec;
|
||||
var upperA = Math.Atan2(y,x);
|
||||
var upperB = RadiansToDegrees(upperA);
|
||||
var upperB = upperA.RadiansToDegrees();
|
||||
|
||||
var ha = upperB;
|
||||
|
||||
@@ -72,19 +71,20 @@ namespace ASCOM.Meade.net.AstroMaths
|
||||
public HorizonCoordinates ConvertEqToHoz(double hourAngle, double latitude, EquatorialCoordinates raDec)
|
||||
{
|
||||
var h = hourAngle * 15;
|
||||
var h1 = DegreesToRadians(h);
|
||||
var d = DegreesToRadians(raDec.Declination);
|
||||
var lat = DegreesToRadians(latitude);
|
||||
var h1 = h.DegreesToRadians();
|
||||
var d = raDec.Declination.DegreesToRadians();
|
||||
var lat = latitude.DegreesToRadians();
|
||||
var sinA = Math.Sin(d) * Math.Sin(lat) + Math.Cos(d) * Math.Cos(lat) * Math.Cos(h1);
|
||||
|
||||
var y = -Math.Cos(d) * Math.Cos(lat) * Math.Sin(h1);
|
||||
var x = Math.Sin(d) - Math.Sin(lat) * sinA;
|
||||
var upperA = Math.Atan2(y, x);
|
||||
var upperB = RadiansToDegrees(upperA);
|
||||
var upperB = upperA.RadiansToDegrees();
|
||||
|
||||
var horizonCoordinates = new HorizonCoordinates
|
||||
{
|
||||
Altitude = RadiansToDegrees(Math.Asin(sinA)), Azimuth = upperB
|
||||
Altitude = Math.Asin(sinA).RadiansToDegrees(),
|
||||
Azimuth = upperB
|
||||
};
|
||||
|
||||
|
||||
@@ -96,82 +96,6 @@ namespace ASCOM.Meade.net.AstroMaths
|
||||
return horizonCoordinates;
|
||||
}
|
||||
|
||||
|
||||
//todo convert to extension method
|
||||
public double DegreesToRadians(double degrees)
|
||||
{
|
||||
return (Math.PI / 180) * degrees;
|
||||
}
|
||||
|
||||
//todo convert to extension method
|
||||
public double RadiansToDegrees(double radians)
|
||||
{
|
||||
double degrees = (180 / Math.PI) * radians;
|
||||
return degrees;
|
||||
}
|
||||
|
||||
//todo convert to extension method
|
||||
public double DateTimeToDecimalHours( DateTime utcDateTime)
|
||||
{
|
||||
double sec = utcDateTime.Second;
|
||||
double min = utcDateTime.Minute;
|
||||
double hour = utcDateTime.Hour;
|
||||
|
||||
var a = Math.Abs(sec) / 60;
|
||||
var b = (Math.Abs(min) + a) / 60;
|
||||
var c = Math.Abs(hour) + b;
|
||||
|
||||
var d = c;
|
||||
|
||||
if ((hour < 0) || (min < 0) || (sec < 0))
|
||||
d = -c;
|
||||
|
||||
return d;
|
||||
}
|
||||
|
||||
//todo convert to extension method
|
||||
public double UTtoGst(DateTime utcDateTime)
|
||||
{
|
||||
Util util = new Util();
|
||||
|
||||
var jd = util.DateUTCToJulian(utcDateTime) - 0.5;
|
||||
if ((jd % 1) <= 0.5 )
|
||||
jd = Math.Floor( jd );
|
||||
else
|
||||
jd = Math.Floor( jd ) + 0.5;
|
||||
|
||||
var s = jd - 2451545.0;
|
||||
var t = s / 36525.0;
|
||||
var t0 = 6.697374558 + (2400.051336 * t ) +(0.000025862 * (t * t) );
|
||||
|
||||
while (t0 < 0)
|
||||
{
|
||||
t0 += 24;
|
||||
}
|
||||
|
||||
while (t0 >= 24)
|
||||
{
|
||||
t0 -= 24;
|
||||
}
|
||||
|
||||
var ut = DateTimeToDecimalHours(utcDateTime);
|
||||
var a = ut * 1.002737909;
|
||||
|
||||
var t1 = t0 + a;
|
||||
|
||||
while (t1 < 0)
|
||||
{
|
||||
t1 += 24;
|
||||
}
|
||||
|
||||
while (t1 >= 24)
|
||||
{
|
||||
t1 -= 24;
|
||||
}
|
||||
|
||||
return t1;
|
||||
}
|
||||
|
||||
public double GsTtoLst(double gst, double longitude)
|
||||
{
|
||||
var l = longitude/ 15;
|
||||
@@ -189,4 +113,4 @@ namespace ASCOM.Meade.net.AstroMaths
|
||||
return lst;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
using System;
|
||||
|
||||
namespace ASCOM.Meade.net
|
||||
{
|
||||
public class Clock : IClock
|
||||
{
|
||||
public DateTime UtcNow => DateTime.UtcNow;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
using System;
|
||||
|
||||
namespace ASCOM.Meade.net
|
||||
{
|
||||
public interface IClock
|
||||
{
|
||||
DateTime UtcNow { get; }
|
||||
}
|
||||
}
|
||||
@@ -15,7 +15,7 @@
|
||||
<UpgradeBackupLocation>
|
||||
</UpgradeBackupLocation>
|
||||
<OldToolsVersion>3.5</OldToolsVersion>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<ApplicationIcon>ASCOM.ico</ApplicationIcon>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<AssemblyOriginatorKeyFile>ASCOMDriverTemplate.snk</AssemblyOriginatorKeyFile>
|
||||
@@ -71,37 +71,40 @@
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="ASCOM.Astrometry, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Astrometry.dll</HintPath>
|
||||
<HintPath>..\packages\ASCOM.Platform.6.5.1\lib\net40\ASCOM.Astrometry.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.Attributes, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Attributes.dll</HintPath>
|
||||
<HintPath>..\packages\ASCOM.Platform.6.5.1\lib\net40\ASCOM.Attributes.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.Cache, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Cache.dll</HintPath>
|
||||
<HintPath>..\packages\ASCOM.Platform.6.5.1\lib\net40\ASCOM.Cache.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.Controls, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Controls.dll</HintPath>
|
||||
<HintPath>..\packages\ASCOM.Platform.6.5.1\lib\net40\ASCOM.Controls.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.DeviceInterfaces, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.DeviceInterfaces.dll</HintPath>
|
||||
<HintPath>..\packages\ASCOM.Platform.6.5.1\lib\net40\ASCOM.DeviceInterfaces.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.DriverAccess, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.DriverAccess.dll</HintPath>
|
||||
<HintPath>..\packages\ASCOM.Platform.6.5.1\lib\net40\ASCOM.DriverAccess.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.Exceptions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Exceptions.dll</HintPath>
|
||||
<HintPath>..\packages\ASCOM.Platform.6.5.1\lib\net40\ASCOM.Exceptions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.Internal.Extensions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Internal.Extensions.dll</HintPath>
|
||||
<HintPath>..\packages\ASCOM.Platform.6.5.1\lib\net40\ASCOM.Internal.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.SettingsProvider, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.SettingsProvider.dll</HintPath>
|
||||
<HintPath>..\packages\ASCOM.Platform.6.5.1\lib\net40\ASCOM.SettingsProvider.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.Utilities, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Utilities.dll</HintPath>
|
||||
<HintPath>..\packages\ASCOM.Platform.6.5.1\lib\net40\ASCOM.Utilities.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.Utilities.Video, Version=6.1.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Utilities.Video.dll</HintPath>
|
||||
<HintPath>..\packages\ASCOM.Platform.6.5.1\lib\net40\ASCOM.Utilities.Video.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="JetBrains.Annotations, Version=2020.3.0.0, Culture=neutral, PublicKeyToken=1010a0d8d6380325, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\JetBrains.Annotations.2020.3.0\lib\net20\JetBrains.Annotations.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.configuration" />
|
||||
@@ -116,12 +119,15 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="AstroMaths\AltitudeData.cs" />
|
||||
<Compile Include="AstroMaths\AstroMathExtensions.cs" />
|
||||
<Compile Include="AstroMaths\AstroMaths.cs" />
|
||||
<Compile Include="AstroMaths\EquatorialCoordinates.cs" />
|
||||
<Compile Include="AstroMaths\HorizonCoordinates.cs" />
|
||||
<Compile Include="AstroMaths\IAstroMaths.cs" />
|
||||
<Compile Include="Clock.cs" />
|
||||
<Compile Include="ComparisonResult.cs" />
|
||||
<Compile Include="DoubleExtensions.cs" />
|
||||
<Compile Include="IClock.cs" />
|
||||
<Compile Include="StringExtensions.cs" />
|
||||
<Compile Include="Telescope.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
|
||||
@@ -5,7 +5,6 @@ using System.Runtime.InteropServices;
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
//
|
||||
// TODO - Add your authorship information here
|
||||
[assembly: AssemblyTitle("ASCOM.Meade.net.Telescope")]
|
||||
[assembly: AssemblyDescription("ASCOM Telescope driver for Meade.net")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
@@ -18,7 +17,7 @@ using System.Runtime.InteropServices;
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(true)]
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("8b9fccb9-87ae-42f7-90af-079e13de6efb")]
|
||||
@@ -33,6 +32,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
//
|
||||
// TODO - Set your driver's version here
|
||||
[assembly: AssemblyVersion("0.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("0.0.0.0")]
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ namespace ASCOM.Meade.net.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.0.0.0")]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.4.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace ASCOM.Meade.net
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
// TODO Add any required object cleanup here
|
||||
// Add any required object cleanup here
|
||||
}
|
||||
|
||||
public double Maximum { get; set; }
|
||||
@@ -106,7 +106,7 @@ namespace ASCOM.Meade.net
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
// TODO Add any required object cleanup here
|
||||
// Add any required object cleanup here
|
||||
}
|
||||
|
||||
public IEnumerator GetEnumerator()
|
||||
@@ -176,7 +176,7 @@ namespace ASCOM.Meade.net
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
// TODO Add any required object cleanup here
|
||||
// Add any required object cleanup here
|
||||
}
|
||||
|
||||
public DriveRates this[int index] => _trackingRates[index - 1];
|
||||
|
||||
+574
-418
File diff suppressed because it is too large
Load Diff
@@ -5,4 +5,4 @@
|
||||
<section name="ASCOM.DeviceName.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/></startup></configuration>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/></startup></configuration>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="ASCOM.Platform" version="6.4.2" targetFramework="net40" />
|
||||
<package id="ASCOM.Platform" version="6.5.1" targetFramework="net472" />
|
||||
<package id="JetBrains.Annotations" version="2020.3.0" targetFramework="net472" />
|
||||
</packages>
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\packages\NUnit.3.12.0\build\NUnit.props" Condition="Exists('..\packages\NUnit.3.12.0\build\NUnit.props')" />
|
||||
<Import Project="..\packages\NUnit.3.13.0\build\NUnit.props" Condition="Exists('..\packages\NUnit.3.13.0\build\NUnit.props')" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
@@ -35,55 +35,58 @@
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="ASCOM.Astrometry, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Astrometry.dll</HintPath>
|
||||
<HintPath>..\packages\ASCOM.Platform.6.5.1\lib\net40\ASCOM.Astrometry.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.Attributes, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Attributes.dll</HintPath>
|
||||
<HintPath>..\packages\ASCOM.Platform.6.5.1\lib\net40\ASCOM.Attributes.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.Cache, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Cache.dll</HintPath>
|
||||
<HintPath>..\packages\ASCOM.Platform.6.5.1\lib\net40\ASCOM.Cache.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.Controls, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Controls.dll</HintPath>
|
||||
<HintPath>..\packages\ASCOM.Platform.6.5.1\lib\net40\ASCOM.Controls.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.DeviceInterfaces, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.DeviceInterfaces.dll</HintPath>
|
||||
<HintPath>..\packages\ASCOM.Platform.6.5.1\lib\net40\ASCOM.DeviceInterfaces.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.DriverAccess, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.DriverAccess.dll</HintPath>
|
||||
<HintPath>..\packages\ASCOM.Platform.6.5.1\lib\net40\ASCOM.DriverAccess.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.Exceptions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Exceptions.dll</HintPath>
|
||||
<HintPath>..\packages\ASCOM.Platform.6.5.1\lib\net40\ASCOM.Exceptions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.Internal.Extensions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Internal.Extensions.dll</HintPath>
|
||||
<HintPath>..\packages\ASCOM.Platform.6.5.1\lib\net40\ASCOM.Internal.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.SettingsProvider, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.SettingsProvider.dll</HintPath>
|
||||
<HintPath>..\packages\ASCOM.Platform.6.5.1\lib\net40\ASCOM.SettingsProvider.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.Utilities, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Utilities.dll</HintPath>
|
||||
<HintPath>..\packages\ASCOM.Platform.6.5.1\lib\net40\ASCOM.Utilities.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.Utilities.Video, Version=6.1.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Utilities.Video.dll</HintPath>
|
||||
<HintPath>..\packages\ASCOM.Platform.6.5.1\lib\net40\ASCOM.Utilities.Video.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Castle.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Castle.Core.4.4.0\lib\net45\Castle.Core.dll</HintPath>
|
||||
<HintPath>..\packages\Castle.Core.4.4.1\lib\net45\Castle.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Moq, Version=4.13.0.0, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Moq.4.13.0\lib\net45\Moq.dll</HintPath>
|
||||
<Reference Include="JetBrains.Annotations, Version=2020.3.0.0, Culture=neutral, PublicKeyToken=1010a0d8d6380325, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\JetBrains.Annotations.2020.3.0\lib\net20\JetBrains.Annotations.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="nunit.framework, Version=3.12.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NUnit.3.12.0\lib\net45\nunit.framework.dll</HintPath>
|
||||
<Reference Include="Moq, Version=4.15.0.0, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Moq.4.15.2\lib\net45\Moq.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="nunit.framework, Version=3.13.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NUnit.3.13.0\lib\net45\nunit.framework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.5.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.6.0\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.5.0.0\lib\net45\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.3\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll</HintPath>
|
||||
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
@@ -112,6 +115,6 @@
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\NUnit.3.12.0\build\NUnit.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NUnit.3.12.0\build\NUnit.props'))" />
|
||||
<Error Condition="!Exists('..\packages\NUnit.3.13.0\build\NUnit.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NUnit.3.13.0\build\NUnit.props'))" />
|
||||
</Target>
|
||||
</Project>
|
||||
@@ -13,6 +13,7 @@ namespace Meade.net.UnitTests
|
||||
public class SharedResourcesUnitTests
|
||||
{
|
||||
private Mock<ISerial> _serialMock;
|
||||
private Mock<ITraceLogger> _traceLoggerMock;
|
||||
|
||||
[SetUp]
|
||||
public void Setup()
|
||||
@@ -20,6 +21,8 @@ namespace Meade.net.UnitTests
|
||||
_serialMock = new Mock<ISerial>();
|
||||
_serialMock.SetupAllProperties();
|
||||
|
||||
_traceLoggerMock = new Mock<ITraceLogger>();
|
||||
|
||||
SharedResources.SharedSerial = _serialMock.Object;
|
||||
}
|
||||
|
||||
@@ -123,6 +126,9 @@ namespace Meade.net.UnitTests
|
||||
profileWrapperMock.Verify(x => x.WriteValue(DriverId, "COM Port", profileProperties.ComPort), Times.Once);
|
||||
profileWrapperMock.Verify(x => x.WriteValue(DriverId, "Guide Rate Arc Seconds Per Second", profileProperties.GuideRateArcSecondsPerSecond.ToString(CultureInfo.CurrentCulture)), Times.Once);
|
||||
profileWrapperMock.Verify(x => x.WriteValue(DriverId, "Precision", profileProperties.Precision), Times.Once);
|
||||
profileWrapperMock.Verify(x => x.WriteValue(DriverId, "Guiding Style", profileProperties.GuidingStyle), Times.Once);
|
||||
profileWrapperMock.Verify(x => x.WriteValue(DriverId, "Backlash Compensation", profileProperties.BacklashCompensation.ToString(CultureInfo.CurrentCulture)), Times.Once);
|
||||
profileWrapperMock.Verify(x => x.WriteValue(DriverId, "Reverse Focuser Direction", profileProperties.ReverseFocusDirection.ToString()), Times.Once);
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -134,12 +140,16 @@ namespace Meade.net.UnitTests
|
||||
string TraceStateDefault = "false";
|
||||
string GuideRateProfileNameDefault = "10.077939"; //67% of sidereal rate
|
||||
string PrecisionDefault = "Unchanged";
|
||||
string GuidingStyleDefault = "Auto";
|
||||
string BacklashCompensationDefault = "3000";
|
||||
string ReverseFocuserDiectionDefault = "true";
|
||||
|
||||
Mock<IProfileWrapper> profileWrapperMock = new Mock<IProfileWrapper>();
|
||||
profileWrapperMock.SetupAllProperties();
|
||||
|
||||
profileWrapperMock.Setup(x => x.GetValue(DriverId, "Trace Level", string.Empty, TraceStateDefault))
|
||||
.Returns(TraceStateDefault);
|
||||
.Returns(() =>
|
||||
TraceStateDefault);
|
||||
profileWrapperMock.Setup(x => x.GetValue(DriverId, "COM Port", string.Empty, ComPortDefault))
|
||||
.Returns(ComPortDefault);
|
||||
profileWrapperMock
|
||||
@@ -147,6 +157,14 @@ namespace Meade.net.UnitTests
|
||||
GuideRateProfileNameDefault)).Returns(GuideRateProfileNameDefault);
|
||||
profileWrapperMock.Setup(x => x.GetValue(DriverId, "Precision", string.Empty, PrecisionDefault))
|
||||
.Returns(PrecisionDefault);
|
||||
profileWrapperMock.Setup(x => x.GetValue(DriverId, "Guiding Style", string.Empty, GuidingStyleDefault))
|
||||
.Returns(GuidingStyleDefault);
|
||||
profileWrapperMock.Setup(x =>
|
||||
x.GetValue(DriverId, "Backlash Compensation", string.Empty, BacklashCompensationDefault))
|
||||
.Returns(BacklashCompensationDefault);
|
||||
profileWrapperMock.Setup(x =>
|
||||
x.GetValue(DriverId, "Reverse Focuser Direction", string.Empty, ReverseFocuserDiectionDefault))
|
||||
.Returns(() => ReverseFocuserDiectionDefault);
|
||||
|
||||
IProfileWrapper profeWrapper = profileWrapperMock.Object;
|
||||
|
||||
@@ -163,13 +181,16 @@ namespace Meade.net.UnitTests
|
||||
Is.EqualTo(double.Parse(GuideRateProfileNameDefault)));
|
||||
Assert.That(profileProperties.TraceLogger, Is.EqualTo(bool.Parse(TraceStateDefault)));
|
||||
Assert.That(profileProperties.Precision, Is.EqualTo(PrecisionDefault));
|
||||
Assert.That(profileProperties.GuidingStyle, Is.EqualTo(GuidingStyleDefault));
|
||||
Assert.That(profileProperties.BacklashCompensation, Is.EqualTo(int.Parse(BacklashCompensationDefault)));
|
||||
Assert.That(profileProperties.ReverseFocusDirection, Is.EqualTo(bool.Parse(ReverseFocuserDiectionDefault)));
|
||||
}
|
||||
|
||||
[TestCase("TCP")]
|
||||
[TestCase("Carrier Pigeon")]
|
||||
public void Connect_WhenDeviceIdIsNotSerial_ThenThrowsException( string deviceId)
|
||||
{
|
||||
var result = Assert.Throws<ArgumentException>( () => { SharedResources.Connect(deviceId, string.Empty); } );
|
||||
var result = Assert.Throws<ArgumentException>( () => { SharedResources.Connect(deviceId, string.Empty, _traceLoggerMock.Object); } );
|
||||
|
||||
Assert.That( result.Message, Is.EqualTo($"deviceId {deviceId} not currently supported") );
|
||||
}
|
||||
@@ -206,10 +227,11 @@ namespace Meade.net.UnitTests
|
||||
|
||||
string serialPortReturn = string.Empty;
|
||||
|
||||
_serialMock.Setup(x => x.Transmit(":GVP#")).Callback(() => { serialPortReturn = ":GVP#"; });
|
||||
_serialMock.Setup(x => x.Transmit("#:GVP#")).Callback(() => { serialPortReturn = ":GVP#"; });
|
||||
_serialMock.Setup(x => x.Transmit("#:GG#")).Callback(() => { serialPortReturn = "0"; });
|
||||
_serialMock.Setup(x => x.ReceiveTerminated("#")).Returns( () => serialPortReturn);
|
||||
|
||||
var result = Assert.Throws<Exception>(() => { SharedResources.Connect(deviceId, string.Empty); });
|
||||
var result = Assert.Throws<Exception>(() => { SharedResources.Connect(deviceId, string.Empty, _traceLoggerMock.Object); });
|
||||
Assert.That(result.Message, Is.EqualTo("Serial port is looping back data, something is wrong with the hardware."));
|
||||
}
|
||||
|
||||
@@ -243,15 +265,27 @@ namespace Meade.net.UnitTests
|
||||
|
||||
SharedResources.ProfileFactory = profileFactoryMock.Object;
|
||||
|
||||
_serialMock.Setup(x => x.Transmit(":GVP#")).Callback(() => { });
|
||||
_serialMock.Setup(x => x.ReceiveTerminated("#")).Returns(() => throw new Exception("Testerror"));
|
||||
string serialPortReturn = string.Empty;
|
||||
|
||||
var connectionResult = SharedResources.Connect(deviceId, string.Empty);
|
||||
|
||||
Assert.That(connectionResult.SameDevice, Is.EqualTo(1));
|
||||
Assert.That(SharedResources.ProductName, Is.EqualTo(TelescopeList.LX200CLASSIC));
|
||||
_serialMock.Setup(x => x.Transmit("#:GVP#")).Callback(() => {
|
||||
serialPortReturn = string.Empty;
|
||||
throw new Exception("Testerror");
|
||||
});
|
||||
_serialMock.Setup(x => x.Transmit("#:GG#")).Callback(() => { serialPortReturn = "0"; });
|
||||
_serialMock.Setup(x => x.ReceiveTerminated("#")).Returns(() => serialPortReturn);
|
||||
|
||||
SharedResources.Disconnect(deviceId, String.Empty);
|
||||
var connectionResult = SharedResources.Connect(deviceId, string.Empty, _traceLoggerMock.Object);
|
||||
try
|
||||
{
|
||||
|
||||
|
||||
Assert.That(connectionResult.SameDevice, Is.EqualTo(1));
|
||||
Assert.That(SharedResources.ProductName, Is.EqualTo(TelescopeList.LX200CLASSIC));
|
||||
}
|
||||
finally
|
||||
{
|
||||
SharedResources.Disconnect(deviceId, String.Empty);
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -286,17 +320,68 @@ namespace Meade.net.UnitTests
|
||||
|
||||
string serialPortReturn = string.Empty;
|
||||
|
||||
_serialMock.Setup(x => x.Transmit(":GVP#")).Callback(() => { serialPortReturn = TelescopeList.Autostar497; });
|
||||
_serialMock.Setup(x => x.Transmit(":GVN#")).Callback(() => { serialPortReturn = TelescopeList.Autostar497_43Eg; });
|
||||
_serialMock.Setup(x => x.Transmit("#:GVP#")).Callback(() => { serialPortReturn = TelescopeList.Autostar497; });
|
||||
_serialMock.Setup(x => x.Transmit("#:GVN#")).Callback(() => { serialPortReturn = TelescopeList.Autostar497_43Eg; });
|
||||
_serialMock.Setup(x => x.Transmit("#:GG#")).Callback(() => { serialPortReturn = "0"; });
|
||||
_serialMock.Setup(x => x.ReceiveTerminated("#")).Returns(() => serialPortReturn);
|
||||
|
||||
var connectionResult = SharedResources.Connect(deviceId, string.Empty);
|
||||
var connectionResult = SharedResources.Connect(deviceId, string.Empty, _traceLoggerMock.Object);
|
||||
try
|
||||
{
|
||||
Assert.That(connectionResult.SameDevice, Is.EqualTo(1));
|
||||
Assert.That(SharedResources.ProductName, Is.EqualTo(TelescopeList.Autostar497));
|
||||
Assert.That(SharedResources.FirmwareVersion, Is.EqualTo(TelescopeList.Autostar497_43Eg));
|
||||
}
|
||||
finally
|
||||
{
|
||||
SharedResources.Disconnect(deviceId, String.Empty);
|
||||
}
|
||||
}
|
||||
|
||||
Assert.That(connectionResult.SameDevice, Is.EqualTo(1));
|
||||
Assert.That(SharedResources.ProductName, Is.EqualTo(TelescopeList.Autostar497));
|
||||
Assert.That(SharedResources.FirmwareVersion, Is.EqualTo(TelescopeList.Autostar497_43Eg));
|
||||
[Test]
|
||||
public void Connect_WhenSerialPortIsNotRespondingCorrectly_ThenExceptionThrown()
|
||||
{
|
||||
string deviceId = "Serial";
|
||||
|
||||
SharedResources.Disconnect(deviceId, String.Empty);
|
||||
string driverDriverId = "ASCOM.MeadeGeneric.Telescope";
|
||||
|
||||
string ComPortDefault = "COM1";
|
||||
string TraceStateDefault = "false";
|
||||
string GuideRateProfileNameDefault = "10.077939"; //67% of sidereal rate
|
||||
string PrecisionDefault = "Unchanged";
|
||||
|
||||
Mock<IProfileWrapper> profileWrapperMock = new Mock<IProfileWrapper>();
|
||||
profileWrapperMock.SetupAllProperties();
|
||||
|
||||
profileWrapperMock.Setup(x => x.GetValue(driverDriverId, "Trace Level", string.Empty, TraceStateDefault))
|
||||
.Returns(TraceStateDefault);
|
||||
profileWrapperMock.Setup(x => x.GetValue(driverDriverId, "COM Port", string.Empty, ComPortDefault))
|
||||
.Returns(ComPortDefault);
|
||||
profileWrapperMock
|
||||
.Setup(x => x.GetValue(driverDriverId, "Guide Rate Arc Seconds Per Second", string.Empty,
|
||||
GuideRateProfileNameDefault)).Returns(GuideRateProfileNameDefault);
|
||||
profileWrapperMock.Setup(x => x.GetValue(driverDriverId, "Precision", string.Empty, PrecisionDefault))
|
||||
.Returns(PrecisionDefault);
|
||||
|
||||
Mock<IProfileFactory> profileFactoryMock = new Mock<IProfileFactory>();
|
||||
profileFactoryMock.Setup(x => x.Create()).Returns(profileWrapperMock.Object);
|
||||
|
||||
SharedResources.ProfileFactory = profileFactoryMock.Object;
|
||||
|
||||
string serialPortReturn = string.Empty;
|
||||
|
||||
_serialMock.Setup(x => x.Transmit("#:GVP#")).Callback(() => { serialPortReturn = TelescopeList.Autostar497; });
|
||||
_serialMock.Setup(x => x.Transmit("#:GVN#")).Callback(() => { serialPortReturn = TelescopeList.Autostar497_43Eg; });
|
||||
_serialMock.Setup(x => x.Transmit("#:GG#")).Callback(() => { serialPortReturn = ""; });
|
||||
_serialMock.Setup(x => x.ReceiveTerminated("#")).Returns(() => serialPortReturn);
|
||||
|
||||
var result = Assert.Throws<Exception>(() =>
|
||||
{
|
||||
SharedResources.Connect(deviceId, string.Empty, _traceLoggerMock.Object);
|
||||
});
|
||||
Assert.That(result.Message, Is.EqualTo("Unable to decode response from the telescope, This is likely a hardware serial communications error."));
|
||||
|
||||
_traceLoggerMock.Verify( x => x.LogIssue("Connect", "Unable to decode response from the telescope, This is likely a hardware serial communications error."), Times.Once);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.5.0" newVersion="4.0.5.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="ASCOM.Platform" version="6.4.2" targetFramework="net472" />
|
||||
<package id="Castle.Core" version="4.4.0" targetFramework="net472" />
|
||||
<package id="Moq" version="4.13.0" targetFramework="net472" />
|
||||
<package id="NUnit" version="3.12.0" targetFramework="net472" />
|
||||
<package id="System.Runtime.CompilerServices.Unsafe" version="4.6.0" targetFramework="net472" />
|
||||
<package id="System.Threading.Tasks.Extensions" version="4.5.3" targetFramework="net472" />
|
||||
<package id="ASCOM.Platform" version="6.5.1" targetFramework="net472" />
|
||||
<package id="Castle.Core" version="4.4.1" targetFramework="net472" />
|
||||
<package id="JetBrains.Annotations" version="2020.3.0" targetFramework="net472" />
|
||||
<package id="Moq" version="4.15.2" targetFramework="net472" />
|
||||
<package id="NUnit" version="3.13.0" targetFramework="net472" />
|
||||
<package id="System.Runtime.CompilerServices.Unsafe" version="5.0.0" targetFramework="net472" />
|
||||
<package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net472" />
|
||||
</packages>
|
||||
+103
-181
@@ -2,7 +2,6 @@
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Diagnostics;
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
using ASCOM.DeviceInterface;
|
||||
@@ -19,7 +18,7 @@ namespace ASCOM.Meade.net
|
||||
// The ClassInterface/None addribute prevents an empty interface called
|
||||
// _Meade.net from being created and used as the [default] interface
|
||||
//
|
||||
// TODO Replace the not implemented exceptions with code to implement the function or
|
||||
// Replace the not implemented exceptions with code to implement the function or
|
||||
// throw the appropriate ASCOM exception.
|
||||
//
|
||||
|
||||
@@ -30,7 +29,8 @@ namespace ASCOM.Meade.net
|
||||
[ProgId("ASCOM.MeadeGeneric.focuser")]
|
||||
[ServedClassName("Meade Generic")]
|
||||
[ClassInterface(ClassInterfaceType.None)]
|
||||
public class Focuser : ReferenceCountedObjectBase, IFocuserV3
|
||||
[ComVisible(true)]
|
||||
public class Focuser : MeadeTelescopeBase, IFocuserV3
|
||||
{
|
||||
/// <summary>
|
||||
/// ASCOM DeviceID (COM ProgID) for this driver.
|
||||
@@ -38,26 +38,12 @@ namespace ASCOM.Meade.net
|
||||
/// </summary>
|
||||
//internal static string driverID = "ASCOM.Meade.net.Focuser";
|
||||
private static readonly string DriverId = Marshal.GenerateProgIdForType(MethodBase.GetCurrentMethod().DeclaringType ?? throw new System.InvalidOperationException());
|
||||
// TODO Change the descriptive string for your driver then remove this line
|
||||
/// <summary>
|
||||
/// Driver description that displays in the ASCOM Chooser.
|
||||
/// </summary>
|
||||
private static readonly string DriverDescription = "Meade Generic";
|
||||
|
||||
private static string _comPort; // Variables to hold the currrent device configuration
|
||||
|
||||
/// <summary>
|
||||
/// Private variable to hold an ASCOM Utilities object
|
||||
/// </summary>
|
||||
private readonly IUtil _utilities;
|
||||
|
||||
/// <summary>
|
||||
/// Variable to hold the trace logger object (creates a diagnostic log file with information that you specify)
|
||||
/// </summary>
|
||||
private static TraceLogger _tl;
|
||||
|
||||
private readonly ISharedResourcesWrapper _sharedResourcesWrapper;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Meade.net"/> class.
|
||||
/// Must be public for COM registration.
|
||||
@@ -67,33 +53,17 @@ namespace ASCOM.Meade.net
|
||||
//todo move this out to IOC
|
||||
var util = new Util(); //Initialise util object
|
||||
_utilities = util;
|
||||
_sharedResourcesWrapper = new SharedResourcesWrapper();
|
||||
|
||||
Initialise();
|
||||
Initialise(nameof(Focuser));
|
||||
}
|
||||
|
||||
public Focuser(IUtil util, ISharedResourcesWrapper sharedResourcesWrapper)
|
||||
public Focuser(IUtil util, ISharedResourcesWrapper sharedResourcesWrapper) : base(sharedResourcesWrapper)
|
||||
{
|
||||
_utilities = util;
|
||||
_sharedResourcesWrapper = sharedResourcesWrapper;
|
||||
|
||||
Initialise();
|
||||
Initialise(nameof(Focuser));
|
||||
}
|
||||
|
||||
private void Initialise()
|
||||
{
|
||||
//todo move the TraceLogger out to a factory class.
|
||||
_tl = new TraceLogger("", "Meade.Generic.focusser");
|
||||
|
||||
ReadProfile(); // Read device configuration from the ASCOM Profile store
|
||||
|
||||
IsConnected = false; // Initialise connected to false
|
||||
|
||||
LogMessage("Focuser", "Completed initialisation");
|
||||
LogMessage("Focuser", $"Driver version: {DriverVersion}");
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// PUBLIC COM INTERFACE IFocuserV3 IMPLEMENTATION
|
||||
//
|
||||
@@ -108,17 +78,17 @@ namespace ASCOM.Meade.net
|
||||
/// </summary>
|
||||
public void SetupDialog()
|
||||
{
|
||||
_tl.LogMessage("SetupDialog", "Opening setup dialog");
|
||||
_sharedResourcesWrapper.SetupDialog();
|
||||
Tl.LogMessage("SetupDialog", "Opening setup dialog");
|
||||
SharedResourcesWrapper.SetupDialog();
|
||||
ReadProfile();
|
||||
_tl.LogMessage("SetupDialog", "complete");
|
||||
Tl.LogMessage("SetupDialog", "complete");
|
||||
}
|
||||
|
||||
public ArrayList SupportedActions
|
||||
{
|
||||
get
|
||||
{
|
||||
_tl.LogMessage("SupportedActions Get", "Returning empty arraylist");
|
||||
Tl.LogMessage("SupportedActions Get", "Returning empty arraylist");
|
||||
return new ArrayList();
|
||||
}
|
||||
}
|
||||
@@ -134,7 +104,7 @@ namespace ASCOM.Meade.net
|
||||
CheckConnected("CommandBlind");
|
||||
// Call CommandString and return as soon as it finishes
|
||||
//this.CommandString(command, raw);
|
||||
_sharedResourcesWrapper.SendBlind(command);
|
||||
SharedResourcesWrapper.SendBlind(command);
|
||||
// or
|
||||
//throw new ASCOM.MethodNotImplementedException("CommandBlind");
|
||||
// DO NOT have both these sections! One or the other
|
||||
@@ -144,7 +114,7 @@ namespace ASCOM.Meade.net
|
||||
{
|
||||
CheckConnected("CommandBool");
|
||||
//string ret = CommandString(command, raw);
|
||||
// TODO decode the return string and return true or false
|
||||
// decode the return string and return true or false
|
||||
// or
|
||||
throw new MethodNotImplementedException("CommandBool");
|
||||
// DO NOT have both these sections! One or the other
|
||||
@@ -156,16 +126,16 @@ namespace ASCOM.Meade.net
|
||||
// it's a good idea to put all the low level communication with the device here,
|
||||
// then all communication calls this function
|
||||
// you need something to ensure that only one command is in progress at a time
|
||||
return _sharedResourcesWrapper.SendString(command);
|
||||
return SharedResourcesWrapper.SendString(command);
|
||||
//throw new ASCOM.MethodNotImplementedException("CommandString");
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
// Clean up the tracelogger and util objects
|
||||
_tl.Enabled = false;
|
||||
_tl.Dispose();
|
||||
_tl = null;
|
||||
Tl.Enabled = false;
|
||||
Tl.Dispose();
|
||||
Tl = null;
|
||||
}
|
||||
|
||||
public bool Connected
|
||||
@@ -177,7 +147,7 @@ namespace ASCOM.Meade.net
|
||||
}
|
||||
set
|
||||
{
|
||||
_tl.LogMessage("Connected", "Set {0}", value);
|
||||
Tl.LogMessage("Connected", "Set {0}", value);
|
||||
if (value == IsConnected)
|
||||
return;
|
||||
|
||||
@@ -186,63 +156,31 @@ namespace ASCOM.Meade.net
|
||||
try
|
||||
{
|
||||
ReadProfile();
|
||||
_sharedResourcesWrapper.Connect("Serial", DriverId);
|
||||
SharedResourcesWrapper.Connect("Serial", DriverId, Tl);
|
||||
try
|
||||
{
|
||||
IsConnected = true;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
_sharedResourcesWrapper.Disconnect("Serial", DriverId);
|
||||
SharedResourcesWrapper.Disconnect("Serial", DriverId);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogMessage("Connected Set", "Error connecting to port {0} - {1}", _comPort, ex.Message);
|
||||
LogMessage("Connected Set", "Error connecting to port {0} - {1}", ComPort, ex.Message);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LogMessage("Connected Set", "Disconnecting from port {0}", _comPort);
|
||||
_sharedResourcesWrapper.Disconnect("Serial", DriverId);
|
||||
LogMessage("Connected Set", "Disconnecting from port {0}", ComPort);
|
||||
SharedResourcesWrapper.Disconnect("Serial", DriverId);
|
||||
IsConnected = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public string Description
|
||||
{
|
||||
// TODO customise this device description
|
||||
get
|
||||
{
|
||||
_tl.LogMessage("Description Get", DriverDescription);
|
||||
return DriverDescription;
|
||||
}
|
||||
}
|
||||
|
||||
public string DriverInfo
|
||||
{
|
||||
get
|
||||
{
|
||||
// TODO customise this driver description
|
||||
string driverInfo = $"{Description} .net driver. Version: {DriverVersion}";
|
||||
LogMessage("DriverInfo Get", driverInfo);
|
||||
return driverInfo;
|
||||
}
|
||||
}
|
||||
|
||||
public string DriverVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
Version version = Assembly.GetExecutingAssembly().GetName().Version;
|
||||
string driverVersion = $"{version.Major}.{version.Minor}.{version.Build}.{version.Revision}";
|
||||
LogMessage("DriverVersion Get", driverVersion);
|
||||
return driverVersion;
|
||||
}
|
||||
}
|
||||
|
||||
public short InterfaceVersion
|
||||
{
|
||||
// set by the driver wizard
|
||||
@@ -259,7 +197,7 @@ namespace ASCOM.Meade.net
|
||||
{
|
||||
//string name = "Short driver name - please customise";
|
||||
string name = DriverDescription;
|
||||
_tl.LogMessage("Name Get", name);
|
||||
Tl.LogMessage("Name Get", name);
|
||||
return name;
|
||||
}
|
||||
}
|
||||
@@ -274,35 +212,29 @@ namespace ASCOM.Meade.net
|
||||
{
|
||||
CheckConnected("Absolute Get");
|
||||
|
||||
_tl.LogMessage("Absolute Get", false.ToString());
|
||||
Tl.LogMessage("Absolute Get", false.ToString());
|
||||
return false; // This is a relative focuser
|
||||
}
|
||||
}
|
||||
|
||||
public void Halt()
|
||||
{
|
||||
_tl.LogMessage("Halt", "Halting");
|
||||
Tl.LogMessage("Halt", "Halting");
|
||||
|
||||
CheckConnected("Halt");
|
||||
|
||||
//A single halt command is sometimes missed by the #909 apm, so let's do it a few times to be safe.
|
||||
//todo make this mockable
|
||||
Stopwatch stopwatch = Stopwatch.StartNew();
|
||||
while (stopwatch.ElapsedMilliseconds < 1000)
|
||||
{
|
||||
_sharedResourcesWrapper.SendBlind(":FQ#");
|
||||
//:FQ# Halt Focuser Motion
|
||||
//Returns: Nothing
|
||||
//todo fix this issue: A single halt command is sometimes missed by the #909 apm, so let's do it a few times to be safe.
|
||||
|
||||
_utilities.WaitForMilliseconds(250);
|
||||
}
|
||||
SharedResourcesWrapper.SendBlind(":FQ#");
|
||||
//:FQ# Halt Focuser Motion
|
||||
//Returns: Nothing
|
||||
}
|
||||
|
||||
public bool IsMoving
|
||||
{
|
||||
get
|
||||
{
|
||||
_tl.LogMessage("IsMoving Get", false.ToString());
|
||||
Tl.LogMessage("IsMoving Get", false.ToString());
|
||||
return false; // This focuser always moves instantaneously so no need for IsMoving ever to be True
|
||||
}
|
||||
}
|
||||
@@ -311,12 +243,12 @@ namespace ASCOM.Meade.net
|
||||
{
|
||||
get
|
||||
{
|
||||
_tl.LogMessage("Link Get", Connected.ToString());
|
||||
Tl.LogMessage("Link Get", Connected.ToString());
|
||||
return Connected; // Direct function to the connected method, the Link method is just here for backwards compatibility
|
||||
}
|
||||
set
|
||||
{
|
||||
_tl.LogMessage("Link Set", value.ToString());
|
||||
Tl.LogMessage("Link Set", value.ToString());
|
||||
Connected = value; // Direct function to the connected method, the Link method is just here for backwards compatibility
|
||||
}
|
||||
}
|
||||
@@ -326,30 +258,27 @@ namespace ASCOM.Meade.net
|
||||
{
|
||||
get
|
||||
{
|
||||
_tl.LogMessage("MaxIncrement Get", _maxIncrement.ToString());
|
||||
Tl.LogMessage("MaxIncrement Get", _maxIncrement.ToString());
|
||||
return _maxIncrement; // Maximum change in one move
|
||||
}
|
||||
}
|
||||
|
||||
private readonly int _maxStep = 7000;
|
||||
|
||||
public int MaxStep
|
||||
{
|
||||
get
|
||||
{
|
||||
_tl.LogMessage("MaxStep Get", _maxStep.ToString());
|
||||
Tl.LogMessage("MaxStep Get", _maxStep.ToString());
|
||||
return _maxStep;
|
||||
}
|
||||
}
|
||||
|
||||
public void Move(int position)
|
||||
{
|
||||
_tl.LogMessage("Move", position.ToString());
|
||||
Tl.LogMessage("Move", position.ToString());
|
||||
CheckConnected("Move");
|
||||
|
||||
//todo implement backlash compensation
|
||||
//todo implement direction reverse
|
||||
//todo implement dynamic braking
|
||||
|
||||
if (position < -MaxIncrement || position > MaxIncrement)
|
||||
{
|
||||
throw new InvalidValueException($"position out of range {-MaxIncrement} < {position} < {MaxIncrement}");
|
||||
@@ -358,45 +287,75 @@ namespace ASCOM.Meade.net
|
||||
if (position == 0)
|
||||
return;
|
||||
|
||||
MoveFocuser(position > 0, Math.Abs(position));
|
||||
var direction = position > 0;
|
||||
if (ReverseFocusDirection)
|
||||
direction = !direction;
|
||||
|
||||
SharedResourcesWrapper.Lock(() =>
|
||||
{
|
||||
//backlash compensation.
|
||||
var backlashCompensationSteps = direction ? Math.Abs(BacklashCompensation) : 0;
|
||||
|
||||
var steps = Math.Abs(position) + backlashCompensationSteps;
|
||||
|
||||
|
||||
MoveFocuser(direction, steps);
|
||||
|
||||
|
||||
//todo refactor the backlash compensation to combine the commands into as few moves as practicle.
|
||||
//ApplyBacklashCompensation(direction);
|
||||
if (direction & backlashCompensationSteps != 0)
|
||||
{
|
||||
Tl.LogMessage("Move", "Applying backlash compensation");
|
||||
MoveFocuser(!direction, backlashCompensationSteps);
|
||||
}
|
||||
|
||||
DynamicBreaking(direction);
|
||||
//todo implement dynamic braking
|
||||
//dynamic breaking is sending the command to move in the opposite direction immediatly followed by the command to stop.
|
||||
});
|
||||
}
|
||||
|
||||
private void DynamicBreaking(bool directionOut)
|
||||
{
|
||||
if (!UseDynamicBreaking)
|
||||
return;
|
||||
|
||||
Tl.LogMessage("Move", "Applying dynamic breaking");
|
||||
|
||||
PerformFocuserMove(directionOut);
|
||||
Halt();
|
||||
}
|
||||
|
||||
private void MoveFocuser(bool directionOut, int steps)
|
||||
{
|
||||
_sharedResourcesWrapper.Lock(() =>
|
||||
{
|
||||
//_sharedResourcesWrapper.SendBlind("#:FF#");
|
||||
//:FF# Set Focus speed to fastest setting
|
||||
//Returns: Nothing
|
||||
//_sharedResourcesWrapper.SendBlind(":FF#");
|
||||
//:FF# Set Focus speed to fastest setting
|
||||
//Returns: Nothing
|
||||
|
||||
//:FS# Set Focus speed to slowest setting
|
||||
//Returns: Nothing
|
||||
//:FS# Set Focus speed to slowest setting
|
||||
//Returns: Nothing
|
||||
|
||||
//:F<n># Autostar, Autostar II – set focuser speed to <n> where <n> is an ASCII digit 1..4
|
||||
//Returns: Nothing
|
||||
//All others – Not Supported
|
||||
_utilities.WaitForMilliseconds(100);
|
||||
//:F<n># Autostar, Autostar II – set focuser speed to <n> where <n> is an ASCII digit 1..4
|
||||
//Returns: Nothing
|
||||
//All others – Not Supported
|
||||
_utilities.WaitForMilliseconds(100);
|
||||
|
||||
PerformFocuserMove(directionOut);
|
||||
|
||||
//A Single focus command sometimes gets lost on the #909, so sending lots of them solves the issue.
|
||||
//todo make this mockable
|
||||
Stopwatch stopwatch = Stopwatch.StartNew();
|
||||
while (stopwatch.ElapsedMilliseconds < steps)
|
||||
{
|
||||
_sharedResourcesWrapper.SendBlind(directionOut ? "#:F+#" : "#:F-#");
|
||||
//:F+# Start Focuser moving inward (toward objective)
|
||||
//Returns: None
|
||||
_utilities.WaitForMilliseconds(steps);
|
||||
|
||||
//:F-# Start Focuser moving outward (away from objective)
|
||||
//Returns: None
|
||||
Halt();
|
||||
}
|
||||
|
||||
_utilities.WaitForMilliseconds(250);
|
||||
}
|
||||
private void PerformFocuserMove(bool directionOut)
|
||||
{
|
||||
SharedResourcesWrapper.SendBlind(directionOut ? ":F+#" : ":F-#");
|
||||
//:F+# Start Focuser moving inward (toward objective)
|
||||
//Returns: None
|
||||
|
||||
Halt();
|
||||
|
||||
//This gives the focuser time to physically stop.
|
||||
_utilities.WaitForMilliseconds(1000);
|
||||
});
|
||||
//:F-# Start Focuser moving outward (away from objective)
|
||||
//Returns: None
|
||||
}
|
||||
|
||||
public int Position => throw new PropertyNotImplementedException("Position", false);
|
||||
@@ -405,7 +364,7 @@ namespace ASCOM.Meade.net
|
||||
{
|
||||
get
|
||||
{
|
||||
_tl.LogMessage("StepSize Get", "Not implemented");
|
||||
Tl.LogMessage("StepSize Get", "Not implemented");
|
||||
throw new PropertyNotImplementedException("StepSize", false);
|
||||
}
|
||||
}
|
||||
@@ -414,13 +373,13 @@ namespace ASCOM.Meade.net
|
||||
{
|
||||
get
|
||||
{
|
||||
_tl.LogMessage("TempComp Get", false.ToString());
|
||||
Tl.LogMessage("TempComp Get", false.ToString());
|
||||
return false;
|
||||
}
|
||||
// ReSharper disable once ValueParameterNotUsed
|
||||
set
|
||||
{
|
||||
_tl.LogMessage("TempComp Set", "Not implemented");
|
||||
Tl.LogMessage("TempComp Set", "Not implemented");
|
||||
throw new PropertyNotImplementedException("TempComp", false);
|
||||
}
|
||||
}
|
||||
@@ -429,7 +388,7 @@ namespace ASCOM.Meade.net
|
||||
{
|
||||
get
|
||||
{
|
||||
_tl.LogMessage("TempCompAvailable Get", false.ToString());
|
||||
Tl.LogMessage("TempCompAvailable Get", false.ToString());
|
||||
return false; // Temperature compensation is not available in this driver
|
||||
}
|
||||
}
|
||||
@@ -438,7 +397,7 @@ namespace ASCOM.Meade.net
|
||||
{
|
||||
get
|
||||
{
|
||||
_tl.LogMessage("Temperature Get", "Not implemented");
|
||||
Tl.LogMessage("Temperature Get", "Not implemented");
|
||||
throw new PropertyNotImplementedException("Temperature", false);
|
||||
}
|
||||
}
|
||||
@@ -451,13 +410,6 @@ namespace ASCOM.Meade.net
|
||||
|
||||
#region ASCOM Registration
|
||||
|
||||
private static IProfileFactory _profileFactory;
|
||||
public static IProfileFactory ProfileFactory
|
||||
{
|
||||
get => _profileFactory ?? (_profileFactory = new ProfileFactory());
|
||||
set => _profileFactory = value;
|
||||
}
|
||||
|
||||
// Register or unregister driver for ASCOM. This is harmless if already
|
||||
// registered or unregistered.
|
||||
//
|
||||
@@ -470,7 +422,7 @@ namespace ASCOM.Meade.net
|
||||
{
|
||||
using (IProfileWrapper p = ProfileFactory.Create())
|
||||
{
|
||||
p.DeviceType = "Focuser";
|
||||
p.DeviceType = nameof(Focuser);
|
||||
if (bRegister)
|
||||
{
|
||||
p.Register(DriverId, DriverDescription);
|
||||
@@ -529,12 +481,7 @@ namespace ASCOM.Meade.net
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if there is a valid connection to the driver hardware
|
||||
/// </summary>
|
||||
private bool IsConnected { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Use this function to throw an exception if we aren't connected to the hardware
|
||||
/// </summary>
|
||||
@@ -546,31 +493,6 @@ namespace ASCOM.Meade.net
|
||||
throw new NotConnectedException($"Not connected to focuser when trying to execute: {message}");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Read the device configuration from the ASCOM Profile store
|
||||
/// </summary>
|
||||
private void ReadProfile()
|
||||
{
|
||||
var profileProperties = _sharedResourcesWrapper.ReadProfile();
|
||||
_tl.Enabled = profileProperties.TraceLogger;
|
||||
_comPort = profileProperties.ComPort;
|
||||
|
||||
LogMessage("ReadProfile", $"Trace logger enabled: {_tl.Enabled}");
|
||||
LogMessage("ReadProfile", $"Com Port: {_comPort}");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Log helper function that takes formatted strings and arguments
|
||||
/// </summary>
|
||||
/// <param name="identifier"></param>
|
||||
/// <param name="message"></param>
|
||||
/// <param name="args"></param>
|
||||
private static void LogMessage(string identifier, string message, params object[] args)
|
||||
{
|
||||
var msg = string.Format(message, args);
|
||||
_tl.LogMessage(identifier, msg);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<UpgradeBackupLocation>
|
||||
</UpgradeBackupLocation>
|
||||
<OldToolsVersion>3.5</OldToolsVersion>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<ApplicationIcon>ASCOM.ico</ApplicationIcon>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<AssemblyOriginatorKeyFile>ASCOMDriverTemplate.snk</AssemblyOriginatorKeyFile>
|
||||
@@ -83,37 +83,40 @@
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="ASCOM.Astrometry, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Astrometry.dll</HintPath>
|
||||
<HintPath>..\packages\ASCOM.Platform.6.5.1\lib\net40\ASCOM.Astrometry.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.Attributes, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Attributes.dll</HintPath>
|
||||
<HintPath>..\packages\ASCOM.Platform.6.5.1\lib\net40\ASCOM.Attributes.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.Cache, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Cache.dll</HintPath>
|
||||
<HintPath>..\packages\ASCOM.Platform.6.5.1\lib\net40\ASCOM.Cache.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.Controls, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Controls.dll</HintPath>
|
||||
<HintPath>..\packages\ASCOM.Platform.6.5.1\lib\net40\ASCOM.Controls.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.DeviceInterfaces, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.DeviceInterfaces.dll</HintPath>
|
||||
<HintPath>..\packages\ASCOM.Platform.6.5.1\lib\net40\ASCOM.DeviceInterfaces.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.DriverAccess, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.DriverAccess.dll</HintPath>
|
||||
<HintPath>..\packages\ASCOM.Platform.6.5.1\lib\net40\ASCOM.DriverAccess.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.Exceptions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Exceptions.dll</HintPath>
|
||||
<HintPath>..\packages\ASCOM.Platform.6.5.1\lib\net40\ASCOM.Exceptions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.Internal.Extensions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Internal.Extensions.dll</HintPath>
|
||||
<HintPath>..\packages\ASCOM.Platform.6.5.1\lib\net40\ASCOM.Internal.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.SettingsProvider, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.SettingsProvider.dll</HintPath>
|
||||
<HintPath>..\packages\ASCOM.Platform.6.5.1\lib\net40\ASCOM.SettingsProvider.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.Utilities, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Utilities.dll</HintPath>
|
||||
<HintPath>..\packages\ASCOM.Platform.6.5.1\lib\net40\ASCOM.Utilities.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.Utilities.Video, Version=6.1.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Utilities.Video.dll</HintPath>
|
||||
<HintPath>..\packages\ASCOM.Platform.6.5.1\lib\net40\ASCOM.Utilities.Video.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="JetBrains.Annotations, Version=2020.3.0.0, Culture=neutral, PublicKeyToken=1010a0d8d6380325, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\JetBrains.Annotations.2020.3.0\lib\net20\JetBrains.Annotations.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.configuration" />
|
||||
|
||||
@@ -5,7 +5,6 @@ using System.Runtime.InteropServices;
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
//
|
||||
// TODO - Add your authorship information here
|
||||
[assembly: AssemblyTitle("ASCOM.Meade.net.Focuser")]
|
||||
[assembly: AssemblyDescription("ASCOM Focuser driver for Meade.net")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
@@ -18,7 +17,7 @@ using System.Runtime.InteropServices;
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(true)]
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("4ad7a6d4-6d54-4a9a-bbf3-895353e318f8")]
|
||||
@@ -33,6 +32,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
//
|
||||
// TODO - Set your driver's version here
|
||||
[assembly: AssemblyVersion("0.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("0.0.0.0")]
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ namespace ASCOM.Meade.net.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.0.0.0")]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.4.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
@@ -5,4 +5,4 @@
|
||||
<section name="ASCOM.DeviceName.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/></startup></configuration>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/></startup></configuration>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="ASCOM.Platform" version="6.4.2" targetFramework="net40" />
|
||||
<package id="ASCOM.Platform" version="6.5.1" targetFramework="net472" />
|
||||
<package id="JetBrains.Annotations" version="2020.3.0" targetFramework="net472" />
|
||||
</packages>
|
||||
@@ -0,0 +1,6 @@
|
||||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||
<s:Boolean x:Key="/Default/Housekeeping/ExcludedProjects/ProjectMasksToIgnore/=_002A_002A_005C_002A_002EUnitTests/@EntryIndexedValue">False</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/Housekeeping/ExcludedProjects/ProjectMasksToIgnore/=_002A_002A_005C_002A_002EUnitTests/@EntryIndexRemoved">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/Housekeeping/ExcludedProjects/ProjectMasksToIgnore/=_002A_002EUnitTests_002E_002A/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=ASCOM/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Autostar/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
|
||||
@@ -1,16 +0,0 @@
|
||||
<SolutionConfiguration>
|
||||
<Settings>
|
||||
<AutoEnable>True</AutoEnable>
|
||||
<CurrentEngineMode>Run all tests automatically [Global]</CurrentEngineMode>
|
||||
<MetricsTreeShowTestProjects>False</MetricsTreeShowTestProjects>
|
||||
<StatusIndicatorSplitterDistance>25</StatusIndicatorSplitterDistance>
|
||||
<TestsWindowMenuOptions>
|
||||
<VerticalSplitMenuOption>false</VerticalSplitMenuOption>
|
||||
<ShowPassingTestsMenuOption>false</ShowPassingTestsMenuOption>
|
||||
<ShowFailingTestsMenuOption>true</ShowFailingTestsMenuOption>
|
||||
<ShowUnexecutedTestsMenuOption>true</ShowUnexecutedTestsMenuOption>
|
||||
<ShowIgnoredTestsMenuOption>false</ShowIgnoredTestsMenuOption>
|
||||
</TestsWindowMenuOptions>
|
||||
<TestsWindowSplitterDistance>544</TestsWindowSplitterDistance>
|
||||
</Settings>
|
||||
</SolutionConfiguration>
|
||||
+18
-13
@@ -337,18 +337,23 @@ namespace ASCOM.Meade.net
|
||||
{
|
||||
key?.SetValue(null, progid); // Could be assyTitle/Desc??, but .NET components show ProgId here
|
||||
key?.SetValue("AppId", _sAppId);
|
||||
using (RegistryKey key2 = key.CreateSubKey("Implemented Categories"))
|
||||
if (key != null)
|
||||
{
|
||||
key2?.CreateSubKey("{62C8FE65-4EBB-45e7-B440-6E39B2CDBF29}");
|
||||
}
|
||||
using (RegistryKey key2 = key.CreateSubKey("ProgId"))
|
||||
{
|
||||
key2?.SetValue(null, progid);
|
||||
}
|
||||
key.CreateSubKey("Programmable");
|
||||
using (RegistryKey key2 = key.CreateSubKey("LocalServer32"))
|
||||
{
|
||||
key2?.SetValue(null, Application.ExecutablePath);
|
||||
using (RegistryKey key2 = key.CreateSubKey("Implemented Categories"))
|
||||
{
|
||||
key2?.CreateSubKey("{62C8FE65-4EBB-45e7-B440-6E39B2CDBF29}");
|
||||
}
|
||||
|
||||
using (RegistryKey key2 = key.CreateSubKey("ProgId"))
|
||||
{
|
||||
key2?.SetValue(null, progid);
|
||||
}
|
||||
|
||||
key.CreateSubKey("Programmable");
|
||||
using (RegistryKey key2 = key.CreateSubKey("LocalServer32"))
|
||||
{
|
||||
key2?.SetValue(null, Application.ExecutablePath);
|
||||
}
|
||||
}
|
||||
}
|
||||
//
|
||||
@@ -390,7 +395,7 @@ namespace ASCOM.Meade.net
|
||||
//
|
||||
// Remove all traces of this from the registry.
|
||||
//
|
||||
// **TODO** If the above does AppID/DCOM stuff, this would have
|
||||
// If the above does AppID/DCOM stuff, this would have
|
||||
// to remove that stuff too.
|
||||
//
|
||||
private static void UnregisterObjects()
|
||||
@@ -494,7 +499,7 @@ namespace ASCOM.Meade.net
|
||||
bool bRet = true;
|
||||
|
||||
//
|
||||
//**TODO** -Embedding is "ActiveX start". Prohibit non_AX starting?
|
||||
// -Embedding is "ActiveX start". Prohibit non_AX starting?
|
||||
//
|
||||
if (args.Length > 0)
|
||||
{
|
||||
|
||||
+16
-12
@@ -10,7 +10,7 @@
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>ASCOM.Meade.net</RootNamespace>
|
||||
<AssemblyName>ASCOM.Meade.net.Server</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<OldToolsVersion>2.0</OldToolsVersion>
|
||||
@@ -86,37 +86,40 @@
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="ASCOM.Astrometry, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Astrometry.dll</HintPath>
|
||||
<HintPath>..\packages\ASCOM.Platform.6.5.1\lib\net40\ASCOM.Astrometry.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.Attributes, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Attributes.dll</HintPath>
|
||||
<HintPath>..\packages\ASCOM.Platform.6.5.1\lib\net40\ASCOM.Attributes.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.Cache, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Cache.dll</HintPath>
|
||||
<HintPath>..\packages\ASCOM.Platform.6.5.1\lib\net40\ASCOM.Cache.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.Controls, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Controls.dll</HintPath>
|
||||
<HintPath>..\packages\ASCOM.Platform.6.5.1\lib\net40\ASCOM.Controls.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.DeviceInterfaces, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.DeviceInterfaces.dll</HintPath>
|
||||
<HintPath>..\packages\ASCOM.Platform.6.5.1\lib\net40\ASCOM.DeviceInterfaces.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.DriverAccess, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.DriverAccess.dll</HintPath>
|
||||
<HintPath>..\packages\ASCOM.Platform.6.5.1\lib\net40\ASCOM.DriverAccess.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.Exceptions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Exceptions.dll</HintPath>
|
||||
<HintPath>..\packages\ASCOM.Platform.6.5.1\lib\net40\ASCOM.Exceptions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.Internal.Extensions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Internal.Extensions.dll</HintPath>
|
||||
<HintPath>..\packages\ASCOM.Platform.6.5.1\lib\net40\ASCOM.Internal.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.SettingsProvider, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.SettingsProvider.dll</HintPath>
|
||||
<HintPath>..\packages\ASCOM.Platform.6.5.1\lib\net40\ASCOM.SettingsProvider.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.Utilities, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Utilities.dll</HintPath>
|
||||
<HintPath>..\packages\ASCOM.Platform.6.5.1\lib\net40\ASCOM.Utilities.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASCOM.Utilities.Video, Version=6.1.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ASCOM.Platform.6.4.2\lib\net40\ASCOM.Utilities.Video.dll</HintPath>
|
||||
<HintPath>..\packages\ASCOM.Platform.6.5.1\lib\net40\ASCOM.Utilities.Video.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="JetBrains.Annotations, Version=2020.3.0.0, Culture=neutral, PublicKeyToken=1010a0d8d6380325, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\JetBrains.Annotations.2020.3.0\lib\net20\JetBrains.Annotations.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Drawing" />
|
||||
@@ -134,6 +137,7 @@
|
||||
</Compile>
|
||||
<Compile Include="GarbageCollection.cs" />
|
||||
<Compile Include="LocalServer.cs" />
|
||||
<Compile Include="MeadeTelescopeBase.cs" />
|
||||
<Compile Include="ProfileFactory.cs" />
|
||||
<Compile Include="ProfileProperties.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
|
||||
@@ -0,0 +1,150 @@
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
using ASCOM.Meade.net.Wrapper;
|
||||
using ASCOM.Utilities;
|
||||
|
||||
namespace ASCOM.Meade.net
|
||||
{
|
||||
[ComVisible(false)]
|
||||
public class MeadeTelescopeBase : ReferenceCountedObjectBase
|
||||
{
|
||||
/// <summary>
|
||||
/// Variable to hold the trace logger object (creates a diagnostic log file with information that you specify)
|
||||
/// </summary>
|
||||
protected static TraceLogger Tl;
|
||||
|
||||
/// <summary>
|
||||
/// Driver description that displays in the ASCOM Chooser.
|
||||
/// </summary>
|
||||
protected static readonly string DriverDescription = "Meade Generic";
|
||||
|
||||
protected static string ComPort; // Variables to hold the currrent device configuration
|
||||
protected static int BacklashCompensation;
|
||||
protected static bool ReverseFocusDirection;
|
||||
protected static bool UseDynamicBreaking;
|
||||
protected double GuideRate;
|
||||
protected string Precision;
|
||||
protected string GuidingStyle;
|
||||
protected double SiteElevation;
|
||||
protected short ProfileSettleTime;
|
||||
|
||||
protected readonly ISharedResourcesWrapper SharedResourcesWrapper;
|
||||
|
||||
public MeadeTelescopeBase()
|
||||
{
|
||||
SharedResourcesWrapper = new SharedResourcesWrapper();
|
||||
}
|
||||
|
||||
public MeadeTelescopeBase(ISharedResourcesWrapper sharedResourcesWrapper)
|
||||
{
|
||||
SharedResourcesWrapper = sharedResourcesWrapper;
|
||||
}
|
||||
|
||||
protected void Initialise(string className)
|
||||
{
|
||||
Tl = new TraceLogger("", $"Meade.Generic.{className}");
|
||||
|
||||
ReadProfile(); // Read device configuration from the ASCOM Profile store
|
||||
|
||||
IsConnected = false; // Initialise connected to false
|
||||
|
||||
LogMessage(className, "Completed initialisation");
|
||||
LogMessage(className, $"Driver version: {DriverVersion}");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Read the device configuration from the ASCOM Profile store
|
||||
/// </summary>
|
||||
protected void ReadProfile()
|
||||
{
|
||||
var profileProperties = SharedResourcesWrapper.ReadProfile();
|
||||
Tl.Enabled = profileProperties.TraceLogger;
|
||||
ComPort = profileProperties.ComPort;
|
||||
BacklashCompensation = profileProperties.BacklashCompensation;
|
||||
ReverseFocusDirection = profileProperties.ReverseFocusDirection;
|
||||
UseDynamicBreaking = profileProperties.DynamicBreaking;
|
||||
GuideRate = profileProperties.GuideRateArcSecondsPerSecond;
|
||||
Precision = profileProperties.Precision;
|
||||
GuidingStyle = profileProperties.GuidingStyle.ToLower();
|
||||
SiteElevation = profileProperties.SiteElevation;
|
||||
ProfileSettleTime = profileProperties.SettleTime;
|
||||
|
||||
LogMessage("ReadProfile", $"Trace logger enabled: {Tl.Enabled}");
|
||||
LogMessage("ReadProfile", $"Com Port: {ComPort}");
|
||||
LogMessage("ReadProfile", $"Backlash Steps: {BacklashCompensation}");
|
||||
LogMessage("ReadProfile", $"Dynamic breaking: {UseDynamicBreaking}");
|
||||
LogMessage("ReadProfile", $"Guide Rate: {GuideRate}");
|
||||
LogMessage("ReadProfile", $"Precision: {Precision}");
|
||||
LogMessage("ReadProfile", $"Guiding Style: {GuidingStyle}");
|
||||
LogMessage("ReadProfile", $"Site Elevation: {SiteElevation}");
|
||||
LogMessage("ReadProfile", $"Settle Time after slew: {ProfileSettleTime}");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Log helper function that takes formatted strings and arguments
|
||||
/// </summary>
|
||||
/// <param name="identifier"></param>
|
||||
/// <param name="message"></param>
|
||||
/// <param name="args"></param>
|
||||
public static void LogMessage(string identifier, string message, params object[] args)
|
||||
{
|
||||
var msg = string.Format(message, args);
|
||||
Tl.LogMessage(identifier, msg);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if there is a valid connection to the driver hardware
|
||||
/// </summary>
|
||||
protected bool IsConnected { get; set; }
|
||||
|
||||
public string Description
|
||||
{
|
||||
get
|
||||
{
|
||||
Tl.LogMessage("Description Get", DriverDescription);
|
||||
return DriverDescription;
|
||||
}
|
||||
}
|
||||
|
||||
public string DriverInfo
|
||||
{
|
||||
get
|
||||
{
|
||||
string driverInfo = $"{Description} .net driver. Version: {DriverVersion}";
|
||||
LogMessage("DriverInfo Get", driverInfo);
|
||||
return driverInfo;
|
||||
}
|
||||
}
|
||||
|
||||
public string DriverVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
Version version = Assembly.GetExecutingAssembly().GetName().Version;
|
||||
string driverVersion = $"{version.Major}.{version.Minor}.{version.Build}.{version.Revision}";
|
||||
LogMessage("DriverVersion Get", driverVersion);
|
||||
return driverVersion;
|
||||
}
|
||||
}
|
||||
|
||||
#region ASCOM Registration
|
||||
|
||||
private static IProfileFactory _profileFactory;
|
||||
|
||||
public static IProfileFactory ProfileFactory
|
||||
{
|
||||
get => _profileFactory ?? (_profileFactory = new ProfileFactory());
|
||||
set => _profileFactory = value;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
protected void UpdateSiteElevation()
|
||||
{
|
||||
var profileProperties = SharedResourcesWrapper.ReadProfile();
|
||||
profileProperties.SiteElevation = SiteElevation;
|
||||
SharedResourcesWrapper.WriteProfile(profileProperties);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,5 +7,12 @@ namespace ASCOM.Meade.net
|
||||
public bool TraceLogger { get; set; }
|
||||
public double GuideRateArcSecondsPerSecond { get; set; }
|
||||
public string Precision { get; set; }
|
||||
public string GuidingStyle { get; set; }
|
||||
public int BacklashCompensation { get; set; }
|
||||
public bool ReverseFocusDirection { get; set; }
|
||||
public bool DynamicBreaking { get; set; }
|
||||
public bool RtsDtrEnabled { get; set; }
|
||||
public double SiteElevation { get; set; }
|
||||
public short SettleTime { get; set; }
|
||||
}
|
||||
}
|
||||
+9
@@ -135,5 +135,14 @@ namespace ASCOM.Meade.net.Properties {
|
||||
return ResourceManager.GetString("SetupDialogForm_TextBox1_TextChanged___0_00_0___of_sidereal_rate_", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Please enter only numbers..
|
||||
/// </summary>
|
||||
internal static string SetupDialogForm_txtElevation_TextChanged_1_Please_enter_only_numbers_ {
|
||||
get {
|
||||
return ResourceManager.GetString("SetupDialogForm_txtElevation_TextChanged_1_Please_enter_only_numbers_", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -144,4 +144,7 @@ Valid are : -register, -unregister and -embedding</value>
|
||||
<data name="SetupDialogForm_SetupDialogForm__0__Settings___1__" xml:space="preserve">
|
||||
<value>{0} Settings ({1})</value>
|
||||
</data>
|
||||
<data name="SetupDialogForm_txtElevation_TextChanged_1_Please_enter_only_numbers_" xml:space="preserve">
|
||||
<value>Please enter only numbers.</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -62,6 +62,8 @@ namespace ASCOM.Meade.net
|
||||
comboBoxComPort.SelectedItem = profileProperties.ComPort;
|
||||
}
|
||||
|
||||
cbxRtsDtr.Checked = profileProperties.RtsDtrEnabled;
|
||||
|
||||
txtGuideRate.Text = profileProperties.GuideRateArcSecondsPerSecond.ToString(CultureInfo.CurrentCulture);
|
||||
try
|
||||
{
|
||||
@@ -71,6 +73,22 @@ namespace ASCOM.Meade.net
|
||||
{
|
||||
cboPrecision.SelectedItem = "Unchanged";
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
cboGuidingStyle.SelectedItem = profileProperties.GuidingStyle;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
cboGuidingStyle.SelectedItem = "Auto";
|
||||
}
|
||||
|
||||
txtBacklashSteps.Text = profileProperties.BacklashCompensation.ToString(CultureInfo.CurrentCulture);
|
||||
txtElevation.Text = profileProperties.SiteElevation.ToString(CultureInfo.CurrentCulture);
|
||||
|
||||
cbxReverseDirection.Checked = profileProperties.ReverseFocusDirection;
|
||||
cbxDynamicBreaking.Checked = profileProperties.DynamicBreaking;
|
||||
nudSettleTime.Value = profileProperties.SettleTime;
|
||||
}
|
||||
|
||||
public ProfileProperties GetProfile()
|
||||
@@ -79,9 +97,16 @@ namespace ASCOM.Meade.net
|
||||
{
|
||||
TraceLogger = chkTrace.Checked,
|
||||
ComPort = comboBoxComPort.SelectedItem.ToString(),
|
||||
RtsDtrEnabled = cbxRtsDtr.Checked,
|
||||
GuideRateArcSecondsPerSecond = double.Parse(txtGuideRate.Text.Trim()),
|
||||
Precision = cboPrecision.SelectedItem.ToString()
|
||||
};
|
||||
Precision = cboPrecision.SelectedItem.ToString(),
|
||||
GuidingStyle = cboGuidingStyle.SelectedItem.ToString(),
|
||||
BacklashCompensation = int.Parse(txtBacklashSteps.Text),
|
||||
ReverseFocusDirection = cbxReverseDirection.Checked,
|
||||
DynamicBreaking = cbxDynamicBreaking.Checked,
|
||||
SiteElevation = double.Parse(txtElevation.Text),
|
||||
SettleTime = Convert.ToInt16(nudSettleTime.Value)
|
||||
};
|
||||
|
||||
return profileProperties;
|
||||
}
|
||||
@@ -139,5 +164,23 @@ namespace ASCOM.Meade.net
|
||||
//txtGuideRate.Enabled = false;
|
||||
//cboPrecision.Enabled = false;
|
||||
}
|
||||
|
||||
private void txtElevation_TextChanged_1(object sender, EventArgs e)
|
||||
{
|
||||
if (System.Text.RegularExpressions.Regex.IsMatch(txtElevation.Text, "[^0-9]"))
|
||||
{
|
||||
MessageBox.Show(Resources.SetupDialogForm_txtElevation_TextChanged_1_Please_enter_only_numbers_);
|
||||
txtElevation.Text = txtElevation.Text.Remove(txtElevation.Text.Length - 1);
|
||||
}
|
||||
}
|
||||
|
||||
private void txtBacklashSteps_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (System.Text.RegularExpressions.Regex.IsMatch(txtBacklashSteps.Text, "[^0-9]"))
|
||||
{
|
||||
MessageBox.Show(Resources.SetupDialogForm_txtElevation_TextChanged_1_Please_enter_only_numbers_);
|
||||
txtBacklashSteps.Text = txtElevation.Text.Remove(txtBacklashSteps.Text.Length - 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Generated
+158
@@ -31,6 +31,7 @@ namespace ASCOM.Meade.net
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SetupDialogForm));
|
||||
this.cmdOK = new System.Windows.Forms.Button();
|
||||
this.cmdCancel = new System.Windows.Forms.Button();
|
||||
@@ -45,7 +46,26 @@ namespace ASCOM.Meade.net
|
||||
this.lblPercentOfSiderealRate = new System.Windows.Forms.Label();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.cboPrecision = new System.Windows.Forms.ComboBox();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.cboGuidingStyle = new System.Windows.Forms.ComboBox();
|
||||
this.label7 = new System.Windows.Forms.Label();
|
||||
this.label8 = new System.Windows.Forms.Label();
|
||||
this.txtBacklashSteps = new System.Windows.Forms.TextBox();
|
||||
this.label9 = new System.Windows.Forms.Label();
|
||||
this.label10 = new System.Windows.Forms.Label();
|
||||
this.label11 = new System.Windows.Forms.Label();
|
||||
this.cbxReverseDirection = new System.Windows.Forms.CheckBox();
|
||||
this.cbxDynamicBreaking = new System.Windows.Forms.CheckBox();
|
||||
this.cbxRtsDtr = new System.Windows.Forms.CheckBox();
|
||||
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
|
||||
this.label12 = new System.Windows.Forms.Label();
|
||||
this.txtElevation = new System.Windows.Forms.TextBox();
|
||||
this.label13 = new System.Windows.Forms.Label();
|
||||
this.label14 = new System.Windows.Forms.Label();
|
||||
this.nudSettleTime = new System.Windows.Forms.NumericUpDown();
|
||||
this.label15 = new System.Windows.Forms.Label();
|
||||
((System.ComponentModel.ISupportInitialize)(this.picASCOM)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nudSettleTime)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// cmdOK
|
||||
@@ -133,10 +153,129 @@ namespace ASCOM.Meade.net
|
||||
resources.ApplyResources(this.cboPrecision, "cboPrecision");
|
||||
this.cboPrecision.Name = "cboPrecision";
|
||||
//
|
||||
// label6
|
||||
//
|
||||
resources.ApplyResources(this.label6, "label6");
|
||||
this.label6.Name = "label6";
|
||||
//
|
||||
// cboGuidingStyle
|
||||
//
|
||||
this.cboGuidingStyle.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cboGuidingStyle.FormattingEnabled = true;
|
||||
this.cboGuidingStyle.Items.AddRange(new object[] {
|
||||
resources.GetString("cboGuidingStyle.Items"),
|
||||
resources.GetString("cboGuidingStyle.Items1"),
|
||||
resources.GetString("cboGuidingStyle.Items2")});
|
||||
resources.ApplyResources(this.cboGuidingStyle, "cboGuidingStyle");
|
||||
this.cboGuidingStyle.Name = "cboGuidingStyle";
|
||||
//
|
||||
// label7
|
||||
//
|
||||
resources.ApplyResources(this.label7, "label7");
|
||||
this.label7.Name = "label7";
|
||||
//
|
||||
// label8
|
||||
//
|
||||
resources.ApplyResources(this.label8, "label8");
|
||||
this.label8.Name = "label8";
|
||||
//
|
||||
// txtBacklashSteps
|
||||
//
|
||||
resources.ApplyResources(this.txtBacklashSteps, "txtBacklashSteps");
|
||||
this.txtBacklashSteps.Name = "txtBacklashSteps";
|
||||
this.txtBacklashSteps.TextChanged += new System.EventHandler(this.txtBacklashSteps_TextChanged);
|
||||
//
|
||||
// label9
|
||||
//
|
||||
resources.ApplyResources(this.label9, "label9");
|
||||
this.label9.Name = "label9";
|
||||
//
|
||||
// label10
|
||||
//
|
||||
resources.ApplyResources(this.label10, "label10");
|
||||
this.label10.Name = "label10";
|
||||
//
|
||||
// label11
|
||||
//
|
||||
resources.ApplyResources(this.label11, "label11");
|
||||
this.label11.Name = "label11";
|
||||
//
|
||||
// cbxReverseDirection
|
||||
//
|
||||
resources.ApplyResources(this.cbxReverseDirection, "cbxReverseDirection");
|
||||
this.cbxReverseDirection.Name = "cbxReverseDirection";
|
||||
this.cbxReverseDirection.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// cbxDynamicBreaking
|
||||
//
|
||||
resources.ApplyResources(this.cbxDynamicBreaking, "cbxDynamicBreaking");
|
||||
this.cbxDynamicBreaking.Name = "cbxDynamicBreaking";
|
||||
this.cbxDynamicBreaking.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// cbxRtsDtr
|
||||
//
|
||||
resources.ApplyResources(this.cbxRtsDtr, "cbxRtsDtr");
|
||||
this.cbxRtsDtr.Name = "cbxRtsDtr";
|
||||
this.toolTip1.SetToolTip(this.cbxRtsDtr, resources.GetString("cbxRtsDtr.ToolTip"));
|
||||
this.cbxRtsDtr.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// label12
|
||||
//
|
||||
resources.ApplyResources(this.label12, "label12");
|
||||
this.label12.Name = "label12";
|
||||
//
|
||||
// txtElevation
|
||||
//
|
||||
resources.ApplyResources(this.txtElevation, "txtElevation");
|
||||
this.txtElevation.Name = "txtElevation";
|
||||
this.txtElevation.TextChanged += new System.EventHandler(this.txtElevation_TextChanged_1);
|
||||
//
|
||||
// label13
|
||||
//
|
||||
resources.ApplyResources(this.label13, "label13");
|
||||
this.label13.Name = "label13";
|
||||
//
|
||||
// label14
|
||||
//
|
||||
resources.ApplyResources(this.label14, "label14");
|
||||
this.label14.Name = "label14";
|
||||
//
|
||||
// nudSettleTime
|
||||
//
|
||||
resources.ApplyResources(this.nudSettleTime, "nudSettleTime");
|
||||
this.nudSettleTime.Maximum = new decimal(new int[] {
|
||||
32767,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.nudSettleTime.Name = "nudSettleTime";
|
||||
//
|
||||
// label15
|
||||
//
|
||||
resources.ApplyResources(this.label15, "label15");
|
||||
this.label15.Name = "label15";
|
||||
//
|
||||
// SetupDialogForm
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.label15);
|
||||
this.Controls.Add(this.nudSettleTime);
|
||||
this.Controls.Add(this.label14);
|
||||
this.Controls.Add(this.label13);
|
||||
this.Controls.Add(this.txtElevation);
|
||||
this.Controls.Add(this.label12);
|
||||
this.Controls.Add(this.cbxRtsDtr);
|
||||
this.Controls.Add(this.cbxDynamicBreaking);
|
||||
this.Controls.Add(this.cbxReverseDirection);
|
||||
this.Controls.Add(this.label11);
|
||||
this.Controls.Add(this.label10);
|
||||
this.Controls.Add(this.txtBacklashSteps);
|
||||
this.Controls.Add(this.label9);
|
||||
this.Controls.Add(this.label8);
|
||||
this.Controls.Add(this.label7);
|
||||
this.Controls.Add(this.cboGuidingStyle);
|
||||
this.Controls.Add(this.label6);
|
||||
this.Controls.Add(this.cboPrecision);
|
||||
this.Controls.Add(this.label5);
|
||||
this.Controls.Add(this.lblPercentOfSiderealRate);
|
||||
@@ -158,6 +297,7 @@ namespace ASCOM.Meade.net
|
||||
this.TopMost = true;
|
||||
this.Shown += new System.EventHandler(this.SetupDialogForm_Shown);
|
||||
((System.ComponentModel.ISupportInitialize)(this.picASCOM)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nudSettleTime)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
@@ -178,5 +318,23 @@ namespace ASCOM.Meade.net
|
||||
private Label lblPercentOfSiderealRate;
|
||||
private Label label5;
|
||||
private ComboBox cboPrecision;
|
||||
private Label label6;
|
||||
private ComboBox cboGuidingStyle;
|
||||
private Label label7;
|
||||
private Label label8;
|
||||
private TextBox txtBacklashSteps;
|
||||
private Label label9;
|
||||
private Label label10;
|
||||
private Label label11;
|
||||
private CheckBox cbxReverseDirection;
|
||||
private CheckBox cbxDynamicBreaking;
|
||||
private CheckBox cbxRtsDtr;
|
||||
private ToolTip toolTip1;
|
||||
private Label label12;
|
||||
private TextBox txtElevation;
|
||||
private Label label13;
|
||||
private Label label14;
|
||||
private NumericUpDown nudSettleTime;
|
||||
private Label label15;
|
||||
}
|
||||
}
|
||||
+517
-28
@@ -123,7 +123,7 @@
|
||||
</data>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="cmdOK.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>281, 225</value>
|
||||
<value>281, 457</value>
|
||||
</data>
|
||||
<data name="cmdOK.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>59, 24</value>
|
||||
@@ -145,13 +145,13 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>cmdOK.ZOrder" xml:space="preserve">
|
||||
<value>12</value>
|
||||
<value>29</value>
|
||||
</data>
|
||||
<data name="cmdCancel.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Bottom, Right</value>
|
||||
</data>
|
||||
<data name="cmdCancel.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>281, 255</value>
|
||||
<value>281, 487</value>
|
||||
</data>
|
||||
<data name="cmdCancel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>59, 25</value>
|
||||
@@ -172,7 +172,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>cmdCancel.ZOrder" xml:space="preserve">
|
||||
<value>11</value>
|
||||
<value>28</value>
|
||||
</data>
|
||||
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 9</value>
|
||||
@@ -196,7 +196,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label1.ZOrder" xml:space="preserve">
|
||||
<value>10</value>
|
||||
<value>27</value>
|
||||
</data>
|
||||
<data name="picASCOM.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Top, Right</value>
|
||||
@@ -223,13 +223,13 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>picASCOM.ZOrder" xml:space="preserve">
|
||||
<value>9</value>
|
||||
<value>26</value>
|
||||
</data>
|
||||
<data name="label2.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label2.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>13, 90</value>
|
||||
<value>12, 90</value>
|
||||
</data>
|
||||
<data name="label2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>58, 13</value>
|
||||
@@ -250,19 +250,19 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label2.ZOrder" xml:space="preserve">
|
||||
<value>8</value>
|
||||
<value>25</value>
|
||||
</data>
|
||||
<data name="chkTrace.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="chkTrace.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>77, 136</value>
|
||||
<value>97, 137</value>
|
||||
</data>
|
||||
<data name="chkTrace.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>69, 17</value>
|
||||
</data>
|
||||
<data name="chkTrace.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>6</value>
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="chkTrace.Text" xml:space="preserve">
|
||||
<value>Trace on</value>
|
||||
@@ -277,16 +277,16 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>chkTrace.ZOrder" xml:space="preserve">
|
||||
<value>7</value>
|
||||
<value>24</value>
|
||||
</data>
|
||||
<data name="comboBoxComPort.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>77, 87</value>
|
||||
<value>97, 87</value>
|
||||
</data>
|
||||
<data name="comboBoxComPort.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>90, 21</value>
|
||||
</data>
|
||||
<data name="comboBoxComPort.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>7</value>
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name=">>comboBoxComPort.Name" xml:space="preserve">
|
||||
<value>comboBoxComPort</value>
|
||||
@@ -298,13 +298,13 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>comboBoxComPort.ZOrder" xml:space="preserve">
|
||||
<value>6</value>
|
||||
<value>23</value>
|
||||
</data>
|
||||
<data name="label3.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label3.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>10, 162</value>
|
||||
<value>12, 278</value>
|
||||
</data>
|
||||
<data name="label3.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>61, 13</value>
|
||||
@@ -325,16 +325,16 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label3.ZOrder" xml:space="preserve">
|
||||
<value>5</value>
|
||||
<value>22</value>
|
||||
</data>
|
||||
<data name="txtGuideRate.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>77, 159</value>
|
||||
<value>97, 275</value>
|
||||
</data>
|
||||
<data name="txtGuideRate.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>46, 20</value>
|
||||
</data>
|
||||
<data name="txtGuideRate.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>9</value>
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="txtGuideRate.Text" xml:space="preserve">
|
||||
<value>10.0</value>
|
||||
@@ -349,13 +349,13 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>txtGuideRate.ZOrder" xml:space="preserve">
|
||||
<value>4</value>
|
||||
<value>21</value>
|
||||
</data>
|
||||
<data name="label4.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label4.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>129, 162</value>
|
||||
<value>149, 278</value>
|
||||
</data>
|
||||
<data name="label4.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>122, 13</value>
|
||||
@@ -376,13 +376,13 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label4.ZOrder" xml:space="preserve">
|
||||
<value>3</value>
|
||||
<value>20</value>
|
||||
</data>
|
||||
<data name="lblPercentOfSiderealRate.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="lblPercentOfSiderealRate.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>129, 175</value>
|
||||
<value>149, 291</value>
|
||||
</data>
|
||||
<data name="lblPercentOfSiderealRate.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>105, 13</value>
|
||||
@@ -403,13 +403,13 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>lblPercentOfSiderealRate.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
<value>19</value>
|
||||
</data>
|
||||
<data name="label5.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label5.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>13, 194</value>
|
||||
<value>12, 310</value>
|
||||
</data>
|
||||
<data name="label5.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>50, 13</value>
|
||||
@@ -430,7 +430,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label5.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
<value>18</value>
|
||||
</data>
|
||||
<data name="cboPrecision.Items" xml:space="preserve">
|
||||
<value>Unchanged</value>
|
||||
@@ -442,13 +442,13 @@
|
||||
<value>High</value>
|
||||
</data>
|
||||
<data name="cboPrecision.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>77, 191</value>
|
||||
<value>97, 307</value>
|
||||
</data>
|
||||
<data name="cboPrecision.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>90, 21</value>
|
||||
</data>
|
||||
<data name="cboPrecision.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>13</value>
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name=">>cboPrecision.Name" xml:space="preserve">
|
||||
<value>cboPrecision</value>
|
||||
@@ -460,6 +460,489 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>cboPrecision.ZOrder" xml:space="preserve">
|
||||
<value>17</value>
|
||||
</data>
|
||||
<data name="label6.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label6.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="label6.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 337</value>
|
||||
</data>
|
||||
<data name="label6.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>67, 13</value>
|
||||
</data>
|
||||
<data name="label6.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>14</value>
|
||||
</data>
|
||||
<data name="label6.Text" xml:space="preserve">
|
||||
<value>Guiding style</value>
|
||||
</data>
|
||||
<data name=">>label6.Name" xml:space="preserve">
|
||||
<value>label6</value>
|
||||
</data>
|
||||
<data name=">>label6.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label6.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label6.ZOrder" xml:space="preserve">
|
||||
<value>16</value>
|
||||
</data>
|
||||
<data name="cboGuidingStyle.Items" xml:space="preserve">
|
||||
<value>Auto</value>
|
||||
</data>
|
||||
<data name="cboGuidingStyle.Items1" xml:space="preserve">
|
||||
<value>Guide rate slew</value>
|
||||
</data>
|
||||
<data name="cboGuidingStyle.Items2" xml:space="preserve">
|
||||
<value>Pulse guiding</value>
|
||||
</data>
|
||||
<data name="cboGuidingStyle.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>97, 334</value>
|
||||
</data>
|
||||
<data name="cboGuidingStyle.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>90, 21</value>
|
||||
</data>
|
||||
<data name="cboGuidingStyle.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name=">>cboGuidingStyle.Name" xml:space="preserve">
|
||||
<value>cboGuidingStyle</value>
|
||||
</data>
|
||||
<data name=">>cboGuidingStyle.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>cboGuidingStyle.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>cboGuidingStyle.ZOrder" xml:space="preserve">
|
||||
<value>15</value>
|
||||
</data>
|
||||
<data name="label7.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label7.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Microsoft Sans Serif, 8.25pt, style=Bold</value>
|
||||
</data>
|
||||
<data name="label7.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 176</value>
|
||||
</data>
|
||||
<data name="label7.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>66, 13</value>
|
||||
</data>
|
||||
<data name="label7.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>16</value>
|
||||
</data>
|
||||
<data name="label7.Text" xml:space="preserve">
|
||||
<value>Telescope</value>
|
||||
</data>
|
||||
<data name=">>label7.Name" xml:space="preserve">
|
||||
<value>label7</value>
|
||||
</data>
|
||||
<data name=">>label7.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label7.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label7.ZOrder" xml:space="preserve">
|
||||
<value>14</value>
|
||||
</data>
|
||||
<data name="label8.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label8.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Microsoft Sans Serif, 8.25pt, style=Bold</value>
|
||||
</data>
|
||||
<data name="label8.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="label8.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 393</value>
|
||||
</data>
|
||||
<data name="label8.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>52, 13</value>
|
||||
</data>
|
||||
<data name="label8.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>17</value>
|
||||
</data>
|
||||
<data name="label8.Text" xml:space="preserve">
|
||||
<value>Focuser</value>
|
||||
</data>
|
||||
<data name=">>label8.Name" xml:space="preserve">
|
||||
<value>label8</value>
|
||||
</data>
|
||||
<data name=">>label8.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label8.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label8.ZOrder" xml:space="preserve">
|
||||
<value>13</value>
|
||||
</data>
|
||||
<data name="txtBacklashSteps.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>97, 411</value>
|
||||
</data>
|
||||
<data name="txtBacklashSteps.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>46, 20</value>
|
||||
</data>
|
||||
<data name="txtBacklashSteps.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>6</value>
|
||||
</data>
|
||||
<data name="txtBacklashSteps.Text" xml:space="preserve">
|
||||
<value>3000</value>
|
||||
</data>
|
||||
<data name=">>txtBacklashSteps.Name" xml:space="preserve">
|
||||
<value>txtBacklashSteps</value>
|
||||
</data>
|
||||
<data name=">>txtBacklashSteps.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>txtBacklashSteps.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>txtBacklashSteps.ZOrder" xml:space="preserve">
|
||||
<value>11</value>
|
||||
</data>
|
||||
<data name="label9.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label9.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="label9.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 414</value>
|
||||
</data>
|
||||
<data name="label9.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>79, 13</value>
|
||||
</data>
|
||||
<data name="label9.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>18</value>
|
||||
</data>
|
||||
<data name="label9.Text" xml:space="preserve">
|
||||
<value>Backlash steps</value>
|
||||
</data>
|
||||
<data name=">>label9.Name" xml:space="preserve">
|
||||
<value>label9</value>
|
||||
</data>
|
||||
<data name=">>label9.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label9.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label9.ZOrder" xml:space="preserve">
|
||||
<value>12</value>
|
||||
</data>
|
||||
<data name="label10.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label10.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="label10.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>149, 414</value>
|
||||
</data>
|
||||
<data name="label10.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>20, 13</value>
|
||||
</data>
|
||||
<data name="label10.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>20</value>
|
||||
</data>
|
||||
<data name="label10.Text" xml:space="preserve">
|
||||
<value>ms</value>
|
||||
</data>
|
||||
<data name=">>label10.Name" xml:space="preserve">
|
||||
<value>label10</value>
|
||||
</data>
|
||||
<data name=">>label10.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label10.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label10.ZOrder" xml:space="preserve">
|
||||
<value>10</value>
|
||||
</data>
|
||||
<data name="label11.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label11.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Microsoft Sans Serif, 8.25pt, style=Bold</value>
|
||||
</data>
|
||||
<data name="label11.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="label11.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 67</value>
|
||||
</data>
|
||||
<data name="label11.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>71, 13</value>
|
||||
</data>
|
||||
<data name="label11.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>21</value>
|
||||
</data>
|
||||
<data name="label11.Text" xml:space="preserve">
|
||||
<value>Connection</value>
|
||||
</data>
|
||||
<data name=">>label11.Name" xml:space="preserve">
|
||||
<value>label11</value>
|
||||
</data>
|
||||
<data name=">>label11.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label11.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label11.ZOrder" xml:space="preserve">
|
||||
<value>9</value>
|
||||
</data>
|
||||
<data name="cbxReverseDirection.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="cbxReverseDirection.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>97, 437</value>
|
||||
</data>
|
||||
<data name="cbxReverseDirection.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>109, 17</value>
|
||||
</data>
|
||||
<data name="cbxReverseDirection.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>7</value>
|
||||
</data>
|
||||
<data name="cbxReverseDirection.Text" xml:space="preserve">
|
||||
<value>Reverse direction</value>
|
||||
</data>
|
||||
<data name=">>cbxReverseDirection.Name" xml:space="preserve">
|
||||
<value>cbxReverseDirection</value>
|
||||
</data>
|
||||
<data name=">>cbxReverseDirection.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>cbxReverseDirection.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>cbxReverseDirection.ZOrder" xml:space="preserve">
|
||||
<value>8</value>
|
||||
</data>
|
||||
<data name="cbxDynamicBreaking.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="cbxDynamicBreaking.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>97, 460</value>
|
||||
</data>
|
||||
<data name="cbxDynamicBreaking.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>112, 17</value>
|
||||
</data>
|
||||
<data name="cbxDynamicBreaking.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>8</value>
|
||||
</data>
|
||||
<data name="cbxDynamicBreaking.Text" xml:space="preserve">
|
||||
<value>Dynamic Breaking</value>
|
||||
</data>
|
||||
<data name=">>cbxDynamicBreaking.Name" xml:space="preserve">
|
||||
<value>cbxDynamicBreaking</value>
|
||||
</data>
|
||||
<data name=">>cbxDynamicBreaking.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>cbxDynamicBreaking.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>cbxDynamicBreaking.ZOrder" xml:space="preserve">
|
||||
<value>7</value>
|
||||
</data>
|
||||
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<data name="cbxRtsDtr.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="cbxRtsDtr.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="cbxRtsDtr.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>97, 114</value>
|
||||
</data>
|
||||
<data name="cbxRtsDtr.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>112, 17</value>
|
||||
</data>
|
||||
<data name="cbxRtsDtr.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="cbxRtsDtr.Text" xml:space="preserve">
|
||||
<value>Enable RTS/DTR</value>
|
||||
</data>
|
||||
<data name="cbxRtsDtr.ToolTip" xml:space="preserve">
|
||||
<value>Useful for Meade LS scopes</value>
|
||||
</data>
|
||||
<data name=">>cbxRtsDtr.Name" xml:space="preserve">
|
||||
<value>cbxRtsDtr</value>
|
||||
</data>
|
||||
<data name=">>cbxRtsDtr.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>cbxRtsDtr.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>cbxRtsDtr.ZOrder" xml:space="preserve">
|
||||
<value>6</value>
|
||||
</data>
|
||||
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<data name="label12.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label12.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 205</value>
|
||||
</data>
|
||||
<data name="label12.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>72, 13</value>
|
||||
</data>
|
||||
<data name="label12.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>22</value>
|
||||
</data>
|
||||
<data name="label12.Text" xml:space="preserve">
|
||||
<value>Site Elevation</value>
|
||||
</data>
|
||||
<data name=">>label12.Name" xml:space="preserve">
|
||||
<value>label12</value>
|
||||
</data>
|
||||
<data name=">>label12.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label12.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label12.ZOrder" xml:space="preserve">
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name="txtElevation.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>97, 202</value>
|
||||
</data>
|
||||
<data name="txtElevation.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>100, 20</value>
|
||||
</data>
|
||||
<data name="txtElevation.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>23</value>
|
||||
</data>
|
||||
<data name=">>txtElevation.Name" xml:space="preserve">
|
||||
<value>txtElevation</value>
|
||||
</data>
|
||||
<data name=">>txtElevation.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>txtElevation.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>txtElevation.ZOrder" xml:space="preserve">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="label13.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label13.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>203, 205</value>
|
||||
</data>
|
||||
<data name="label13.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>38, 13</value>
|
||||
</data>
|
||||
<data name="label13.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>24</value>
|
||||
</data>
|
||||
<data name="label13.Text" xml:space="preserve">
|
||||
<value>meters</value>
|
||||
</data>
|
||||
<data name=">>label13.Name" xml:space="preserve">
|
||||
<value>label13</value>
|
||||
</data>
|
||||
<data name=">>label13.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label13.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label13.ZOrder" xml:space="preserve">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="label14.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label14.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 236</value>
|
||||
</data>
|
||||
<data name="label14.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>56, 13</value>
|
||||
</data>
|
||||
<data name="label14.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>25</value>
|
||||
</data>
|
||||
<data name="label14.Text" xml:space="preserve">
|
||||
<value>Settle time</value>
|
||||
</data>
|
||||
<data name=">>label14.Name" xml:space="preserve">
|
||||
<value>label14</value>
|
||||
</data>
|
||||
<data name=">>label14.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label14.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label14.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="nudSettleTime.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>97, 234</value>
|
||||
</data>
|
||||
<data name="nudSettleTime.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>120, 20</value>
|
||||
</data>
|
||||
<data name="nudSettleTime.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>26</value>
|
||||
</data>
|
||||
<data name=">>nudSettleTime.Name" xml:space="preserve">
|
||||
<value>nudSettleTime</value>
|
||||
</data>
|
||||
<data name=">>nudSettleTime.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>nudSettleTime.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>nudSettleTime.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="label15.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label15.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>223, 236</value>
|
||||
</data>
|
||||
<data name="label15.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>47, 13</value>
|
||||
</data>
|
||||
<data name="label15.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>27</value>
|
||||
</data>
|
||||
<data name="label15.Text" xml:space="preserve">
|
||||
<value>seconds</value>
|
||||
</data>
|
||||
<data name=">>label15.Name" xml:space="preserve">
|
||||
<value>label15</value>
|
||||
</data>
|
||||
<data name=">>label15.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label15.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label15.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
@@ -469,7 +952,7 @@
|
||||
<value>6, 13</value>
|
||||
</data>
|
||||
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>350, 288</value>
|
||||
<value>350, 520</value>
|
||||
</data>
|
||||
<data name="$this.StartPosition" type="System.Windows.Forms.FormStartPosition, System.Windows.Forms">
|
||||
<value>CenterScreen</value>
|
||||
@@ -477,6 +960,12 @@
|
||||
<data name="$this.Text" xml:space="preserve">
|
||||
<value>Meade.net Setup</value>
|
||||
</data>
|
||||
<data name=">>toolTip1.Name" xml:space="preserve">
|
||||
<value>toolTip1</value>
|
||||
</data>
|
||||
<data name=">>toolTip1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolTip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>$this.Name" xml:space="preserve">
|
||||
<value>SetupDialogForm</value>
|
||||
</data>
|
||||
|
||||
@@ -75,6 +75,7 @@ namespace ASCOM.Meade.net
|
||||
set => _profileFactory = value;
|
||||
}
|
||||
|
||||
//todo add code to ensure that there is a minimum gap between commands. 5ms as default.
|
||||
public static void SendBlind(string message)
|
||||
{
|
||||
lock (LockObject)
|
||||
@@ -136,10 +137,17 @@ namespace ASCOM.Meade.net
|
||||
|
||||
// Constants used for Profile persistence
|
||||
private const string ComPortProfileName = "COM Port";
|
||||
private const string RtsDtrProfileName = "Rts / Dtr";
|
||||
private const string TraceStateProfileName = "Trace Level";
|
||||
private const string GuideRateProfileName = "Guide Rate Arc Seconds Per Second";
|
||||
private const string PrecisionProfileName = "Precision";
|
||||
|
||||
private const string GuidingStyleProfileName = "Guiding Style";
|
||||
private const string BacklashCompensationName = "Backlash Compensation";
|
||||
private const string ReverseFocusDirectionName = "Reverse Focuser Direction";
|
||||
private const string DynamicBreakingName = "Dynamic Breaking";
|
||||
private const string SiteElevationName = "Site Elevation";
|
||||
private const string SettleTimeName = "Settle Time";
|
||||
|
||||
public static void WriteProfile(ProfileProperties profileProperties)
|
||||
{
|
||||
lock (LockObject)
|
||||
@@ -149,16 +157,30 @@ namespace ASCOM.Meade.net
|
||||
driverProfile.DeviceType = "Telescope";
|
||||
driverProfile.WriteValue(DriverId, TraceStateProfileName, profileProperties.TraceLogger.ToString());
|
||||
driverProfile.WriteValue(DriverId, ComPortProfileName, profileProperties.ComPort);
|
||||
driverProfile.WriteValue(DriverId, GuideRateProfileName, profileProperties.GuideRateArcSecondsPerSecond.ToString(CultureInfo.CurrentCulture));
|
||||
driverProfile.WriteValue(DriverId, RtsDtrProfileName, profileProperties.RtsDtrEnabled.ToString());
|
||||
driverProfile.WriteValue(DriverId, GuideRateProfileName, profileProperties.GuideRateArcSecondsPerSecond.ToString(CultureInfo.InvariantCulture));
|
||||
driverProfile.WriteValue(DriverId, PrecisionProfileName, profileProperties.Precision);
|
||||
driverProfile.WriteValue(DriverId, GuidingStyleProfileName, profileProperties.GuidingStyle);
|
||||
driverProfile.WriteValue(DriverId, BacklashCompensationName, profileProperties.BacklashCompensation.ToString());
|
||||
driverProfile.WriteValue(DriverId, ReverseFocusDirectionName, profileProperties.ReverseFocusDirection.ToString());
|
||||
driverProfile.WriteValue(DriverId, DynamicBreakingName, profileProperties.DynamicBreaking.ToString());
|
||||
driverProfile.WriteValue(DriverId, SiteElevationName, profileProperties.SiteElevation.ToString(CultureInfo.InvariantCulture));
|
||||
driverProfile.WriteValue(DriverId, SettleTimeName, profileProperties.SettleTime.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private const string ComPortDefault = "COM1";
|
||||
private const string RtsDtrDefault = "false";
|
||||
private const string TraceStateDefault = "false";
|
||||
private const string GuideRateProfileNameDefault = "10.077939"; //67% of sidereal rate
|
||||
private const string PrecisionDefault = "Unchanged";
|
||||
private const string GuidingStyleDefault = "Auto";
|
||||
private const string BacklashCompensationDefault = "3000";
|
||||
private const string ReverseFocuserDiectionDefault = "true";
|
||||
private const string DynamicBreakingDefault = "true";
|
||||
private const string SiteElevationDefault = "0";
|
||||
private const string SettleTimeDefault = "2";
|
||||
|
||||
public static ProfileProperties ReadProfile()
|
||||
{
|
||||
@@ -169,9 +191,16 @@ namespace ASCOM.Meade.net
|
||||
{
|
||||
driverProfile.DeviceType = "Telescope";
|
||||
profileProperties.ComPort = driverProfile.GetValue(DriverId, ComPortProfileName, string.Empty, ComPortDefault);
|
||||
profileProperties.RtsDtrEnabled = Convert.ToBoolean(driverProfile.GetValue(DriverId, RtsDtrProfileName, string.Empty, RtsDtrDefault));
|
||||
profileProperties.TraceLogger = Convert.ToBoolean(driverProfile.GetValue(DriverId, TraceStateProfileName, string.Empty, TraceStateDefault));
|
||||
profileProperties.GuideRateArcSecondsPerSecond = double.Parse(driverProfile.GetValue(DriverId, GuideRateProfileName, string.Empty, GuideRateProfileNameDefault));
|
||||
profileProperties.GuideRateArcSecondsPerSecond = double.Parse(driverProfile.GetValue(DriverId, GuideRateProfileName, string.Empty, GuideRateProfileNameDefault), NumberFormatInfo.InvariantInfo);
|
||||
profileProperties.Precision = driverProfile.GetValue(DriverId, PrecisionProfileName, string.Empty, PrecisionDefault);
|
||||
profileProperties.GuidingStyle = driverProfile.GetValue(DriverId, GuidingStyleProfileName, string.Empty, GuidingStyleDefault);
|
||||
profileProperties.BacklashCompensation = Convert.ToInt32(driverProfile.GetValue(DriverId, BacklashCompensationName, string.Empty, BacklashCompensationDefault));
|
||||
profileProperties.ReverseFocusDirection = Convert.ToBoolean(driverProfile.GetValue(DriverId, ReverseFocusDirectionName, string.Empty, ReverseFocuserDiectionDefault));
|
||||
profileProperties.DynamicBreaking = Convert.ToBoolean(driverProfile.GetValue(DriverId, DynamicBreakingName, string.Empty, DynamicBreakingDefault));
|
||||
profileProperties.SiteElevation = Convert.ToInt32(driverProfile.GetValue(DriverId, SiteElevationName, string.Empty, SiteElevationDefault));
|
||||
profileProperties.SettleTime = Convert.ToInt16(driverProfile.GetValue(DriverId, SettleTimeName, string.Empty, SettleTimeDefault));
|
||||
}
|
||||
|
||||
return profileProperties;
|
||||
@@ -238,7 +267,8 @@ namespace ASCOM.Meade.net
|
||||
/// </summary>
|
||||
/// <param name="deviceId"></param>
|
||||
/// <param name="driverId"></param>
|
||||
public static ConnectionInfo Connect(string deviceId, string driverId)
|
||||
/// <param name="traceLogger"></param>
|
||||
public static ConnectionInfo Connect(string deviceId, string driverId, ITraceLogger traceLogger)
|
||||
{
|
||||
lock (LockObject)
|
||||
{
|
||||
@@ -254,8 +284,8 @@ namespace ASCOM.Meade.net
|
||||
{
|
||||
var profileProperties = ReadProfile();
|
||||
SharedSerial.PortName = profileProperties.ComPort;
|
||||
SharedSerial.DTREnable = false;
|
||||
SharedSerial.RTSEnable = false;
|
||||
SharedSerial.DTREnable = profileProperties.RtsDtrEnabled;
|
||||
SharedSerial.RTSEnable = profileProperties.RtsDtrEnabled;
|
||||
SharedSerial.DataBits = 8;
|
||||
SharedSerial.StopBits = SerialStopBits.One;
|
||||
SharedSerial.Parity = SerialParity.None;
|
||||
@@ -265,22 +295,46 @@ namespace ASCOM.Meade.net
|
||||
|
||||
try
|
||||
{
|
||||
ProductName = SendString(":GVP#");
|
||||
FirmwareVersion = SendString(":GVN#");
|
||||
ProductName = SendString("#:GVP#");
|
||||
FirmwareVersion = SendString("#:GVN#");
|
||||
}
|
||||
catch (Exception)
|
||||
catch (Exception ex)
|
||||
{
|
||||
traceLogger.LogIssue("Connect", $"Error getting telescope information \"{ex.Message}\" setting to LX200 Classic mode.");
|
||||
ProductName = TelescopeList.LX200CLASSIC;
|
||||
FirmwareVersion = "Unknown";
|
||||
}
|
||||
|
||||
if (ProductName == ":GVP")
|
||||
{
|
||||
traceLogger.LogIssue("Connect", "Serial port is looping back data, something is wrong with the hardware.");
|
||||
//This means that the serial port is looping back what's been sent, something is very wrong.
|
||||
SharedSerial.Connected = false;
|
||||
|
||||
throw new Exception("Serial port is looping back data, something is wrong with the hardware.");
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
string utcOffSet = SendString("#:GG#");
|
||||
//:GG# Get UTC offset time
|
||||
//Returns: sHH# or sHH.H#
|
||||
//The number of decimal hours to add to local time to convert it to UTC. If the number is a whole number the
|
||||
//sHH# form is returned, otherwise the longer form is returned.
|
||||
if (!double.TryParse(utcOffSet, out var utcOffsetHours))
|
||||
{
|
||||
var message = "Unable to decode response from the telescope, This is likely a hardware serial communications error.";
|
||||
traceLogger.LogIssue("Connect", message);
|
||||
throw new Exception(message);
|
||||
}
|
||||
|
||||
traceLogger.LogMessage("Connect", $"Offset from UTC: {utcOffsetHours}", false);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
SharedSerial.Connected = false;
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -4,30 +4,30 @@
|
||||
{
|
||||
#region Autostar 497/Audiostar
|
||||
|
||||
public static readonly string Autostar497 = "Autostar";
|
||||
public const string Autostar497 = "Autostar";
|
||||
|
||||
//Autostar/Audiostar firmware revisions
|
||||
// ReSharper disable once InconsistentNaming
|
||||
public static readonly string Autostar497_30Ee = "30Ee";
|
||||
public const string Autostar497_30Ee = "30Ee";
|
||||
// ReSharper disable once InconsistentNaming
|
||||
public static readonly string Autostar497_31Ee = "31Ee";
|
||||
public const string Autostar497_31Ee = "31Ee";
|
||||
// ReSharper disable once InconsistentNaming
|
||||
public static readonly string Autostar497_43Eg = "43Eg";
|
||||
public const string Autostar497_43Eg = "43Eg";
|
||||
|
||||
#endregion
|
||||
|
||||
#region LX200GPS
|
||||
|
||||
// ReSharper disable once InconsistentNaming
|
||||
public static readonly string LX200GPS = "LX2001";
|
||||
public const string LX200GPS = "LX2001";
|
||||
|
||||
// ReSharper disable once InconsistentNaming
|
||||
public static readonly string LX200GPS_42G = "4.2G";
|
||||
public const string LX200GPS_42G = "4.2G";
|
||||
#endregion
|
||||
|
||||
#region LX200EMC
|
||||
// ReSharper disable once InconsistentNaming
|
||||
public static readonly string LX200CLASSIC = "LX200 Classic"; //GVP command is not supported!
|
||||
public const string LX200CLASSIC = "LX200 Classic"; //GVP command is not supported!
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
using System;
|
||||
using ASCOM.Utilities.Interfaces;
|
||||
|
||||
namespace ASCOM.Meade.net.Wrapper
|
||||
{
|
||||
public interface ISharedResourcesWrapper
|
||||
{
|
||||
ConnectionInfo Connect(string deviceId, string driverId);
|
||||
ConnectionInfo Connect(string deviceId, string driverId, ITraceLogger traceLogger);
|
||||
void Disconnect(string deviceId, string driverId);
|
||||
|
||||
string ProductName { get; }
|
||||
@@ -29,9 +30,9 @@ namespace ASCOM.Meade.net.Wrapper
|
||||
|
||||
public class SharedResourcesWrapper : ISharedResourcesWrapper
|
||||
{
|
||||
public ConnectionInfo Connect(string deviceId, string driverId)
|
||||
public ConnectionInfo Connect(string deviceId, string driverId, ITraceLogger traceLogger)
|
||||
{
|
||||
return SharedResources.Connect(deviceId, driverId);
|
||||
return SharedResources.Connect(deviceId, driverId, traceLogger);
|
||||
}
|
||||
|
||||
public void Disconnect(string deviceId, string driverId)
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<?xml version="1.0"?>
|
||||
<configuration>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/></startup></configuration>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/></startup></configuration>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="ASCOM.Platform" version="6.4.2" targetFramework="net40" />
|
||||
<package id="ASCOM.Platform" version="6.5.1" targetFramework="net472" />
|
||||
<package id="JetBrains.Annotations" version="2020.3.0" targetFramework="net472" />
|
||||
</packages>
|
||||
@@ -59,6 +59,9 @@
|
||||
<ItemGroup>
|
||||
<Reference Include="ASCOM.DeviceInterfaces, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL" />
|
||||
<Reference Include="ASCOM.DriverAccess, Version=6.0.0.0, Culture=neutral, PublicKeyToken=565de7938946fba7, processorArchitecture=MSIL" />
|
||||
<Reference Include="JetBrains.Annotations, Version=2020.3.0.0, Culture=neutral, PublicKeyToken=1010a0d8d6380325, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\JetBrains.Annotations.2020.3.0\lib\net20\JetBrains.Annotations.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
@@ -72,6 +75,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="JetBrains.Annotations" version="2020.3.0" targetFramework="net45" />
|
||||
</packages>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<packageSources>
|
||||
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
|
||||
</packageSources>
|
||||
</configuration>
|
||||
Reference in New Issue
Block a user