Added new alignment mode to the log

This commit is contained in:
2019-10-04 20:42:46 +01:00
parent 670a5ccf81
commit 3dc87e3724
2 changed files with 17 additions and 0 deletions
@@ -348,6 +348,9 @@ namespace Meade.net.Telescope.UnitTests
[TestCase(false)]
public void Connected_Get_ReturnsExpectedValue(bool expectedConnected)
{
const char ack = (char)6;
_sharedResourcesWrapperMock.Setup(x => x.SendChar(ack.ToString())).Returns("P");
_sharedResourcesWrapperMock.Setup(x => x.ProductName).Returns(() => TelescopeList.Autostar497);
_sharedResourcesWrapperMock.Setup(x => x.FirmwareVersion).Returns(() => TelescopeList.Autostar497_31Ee);
_telescope.Connected = expectedConnected;
@@ -367,6 +370,10 @@ namespace Meade.net.Telescope.UnitTests
var productName = TelescopeList.LX200GPS;
var firmware = string.Empty;
const char ack = (char)6;
_sharedResourcesWrapperMock.Setup(x => x.SendChar(ack.ToString())).Returns("P");
_sharedResourcesWrapperMock.Setup(x => x.ProductName).Returns(productName);
_sharedResourcesWrapperMock.Setup(x => x.FirmwareVersion).Returns(firmware);
_telescope.Connected = true;
@@ -409,6 +416,9 @@ namespace Meade.net.Telescope.UnitTests
[Test]
public void Connected_Set_SettingFalseWhenTrue_ThenDisconnects()
{
const char ack = (char)6;
_sharedResourcesWrapperMock.Setup(x => x.SendChar(ack.ToString())).Returns("P");
ConnectTelescope();
_sharedResourcesWrapperMock.Verify(x => x.Connect(It.IsAny<string>(), It.IsAny<string>()), Times.Once);
@@ -804,6 +814,9 @@ namespace Meade.net.Telescope.UnitTests
[TestCase("Low", true, false)]
public void Precision_Set_WhenConnectedAndPrecisionSetHighScopeIsLow_ThenTelescopePrecisionChanged(string desiredPresision, bool telescopePrecision, bool finalPrecision)
{
const char ack = (char)6;
_sharedResourcesWrapperMock.Setup(x => x.SendChar(ack.ToString())).Returns("P");
_profileProperties.Precision = desiredPresision;
var currentPrecision = telescopePrecision;
+4
View File
@@ -388,6 +388,10 @@ namespace ASCOM.Meade.net
if (connectionInfo.SameDevice == 1)
{
LogMessage("Connected Set", "Making first connection telescope adjustments");
AlignmentModes alignmode = AlignmentMode;
LogMessage("Connected Set", alignmode.ToString());
//These settings are applied only when the first device connects to the telescope.
SetLongFormat(true);