Added new alignment mode to the log
This commit is contained in:
@@ -348,6 +348,9 @@ namespace Meade.net.Telescope.UnitTests
|
|||||||
[TestCase(false)]
|
[TestCase(false)]
|
||||||
public void Connected_Get_ReturnsExpectedValue(bool expectedConnected)
|
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.ProductName).Returns(() => TelescopeList.Autostar497);
|
||||||
_sharedResourcesWrapperMock.Setup(x => x.FirmwareVersion).Returns(() => TelescopeList.Autostar497_31Ee);
|
_sharedResourcesWrapperMock.Setup(x => x.FirmwareVersion).Returns(() => TelescopeList.Autostar497_31Ee);
|
||||||
_telescope.Connected = expectedConnected;
|
_telescope.Connected = expectedConnected;
|
||||||
@@ -367,6 +370,10 @@ namespace Meade.net.Telescope.UnitTests
|
|||||||
var productName = TelescopeList.LX200GPS;
|
var productName = TelescopeList.LX200GPS;
|
||||||
var firmware = string.Empty;
|
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.ProductName).Returns(productName);
|
||||||
_sharedResourcesWrapperMock.Setup(x => x.FirmwareVersion).Returns(firmware);
|
_sharedResourcesWrapperMock.Setup(x => x.FirmwareVersion).Returns(firmware);
|
||||||
_telescope.Connected = true;
|
_telescope.Connected = true;
|
||||||
@@ -409,6 +416,9 @@ namespace Meade.net.Telescope.UnitTests
|
|||||||
[Test]
|
[Test]
|
||||||
public void Connected_Set_SettingFalseWhenTrue_ThenDisconnects()
|
public void Connected_Set_SettingFalseWhenTrue_ThenDisconnects()
|
||||||
{
|
{
|
||||||
|
const char ack = (char)6;
|
||||||
|
_sharedResourcesWrapperMock.Setup(x => x.SendChar(ack.ToString())).Returns("P");
|
||||||
|
|
||||||
ConnectTelescope();
|
ConnectTelescope();
|
||||||
_sharedResourcesWrapperMock.Verify(x => x.Connect(It.IsAny<string>(), It.IsAny<string>()), Times.Once);
|
_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)]
|
[TestCase("Low", true, false)]
|
||||||
public void Precision_Set_WhenConnectedAndPrecisionSetHighScopeIsLow_ThenTelescopePrecisionChanged(string desiredPresision, bool telescopePrecision, bool finalPrecision)
|
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;
|
_profileProperties.Precision = desiredPresision;
|
||||||
var currentPrecision = telescopePrecision;
|
var currentPrecision = telescopePrecision;
|
||||||
|
|
||||||
|
|||||||
@@ -388,6 +388,10 @@ namespace ASCOM.Meade.net
|
|||||||
if (connectionInfo.SameDevice == 1)
|
if (connectionInfo.SameDevice == 1)
|
||||||
{
|
{
|
||||||
LogMessage("Connected Set", "Making first connection telescope adjustments");
|
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.
|
//These settings are applied only when the first device connects to the telescope.
|
||||||
SetLongFormat(true);
|
SetLongFormat(true);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user