diff --git a/Meade.net.Telescope.UnitTests/TelescopeUnitTests.cs b/Meade.net.Telescope.UnitTests/TelescopeUnitTests.cs index e501ca3..f1fabbe 100644 --- a/Meade.net.Telescope.UnitTests/TelescopeUnitTests.cs +++ b/Meade.net.Telescope.UnitTests/TelescopeUnitTests.cs @@ -1701,6 +1701,57 @@ namespace Meade.net.Telescope.UnitTests _utilMock.Verify(x => x.WaitForMilliseconds(duration), Times.Once); } + [TestCase(GuideDirections.guideEast, 0, TelescopeList.LX200GPS, "4.2G")] + [TestCase(GuideDirections.guideWest, 0, TelescopeList.LX200GPS, "4.2G")] + [TestCase(GuideDirections.guideNorth, 0, TelescopeList.LX200GPS, "4.2G")] + [TestCase(GuideDirections.guideSouth, 0, TelescopeList.LX200GPS, "4.2G")] + [TestCase(GuideDirections.guideEast, 22161, TelescopeList.LX200GPS, "4.2G")] + [TestCase(GuideDirections.guideWest, 22161, TelescopeList.LX200GPS, "4.2G")] + [TestCase(GuideDirections.guideNorth, 22161, TelescopeList.LX200GPS, "4.2G")] + [TestCase(GuideDirections.guideSouth, 22161, TelescopeList.LX200GPS, "4.2G")] + [TestCase(GuideDirections.guideEast, 0, TelescopeList.RCX400, "2.2I")] + [TestCase(GuideDirections.guideWest, 0, TelescopeList.RCX400, "2.2I")] + [TestCase(GuideDirections.guideNorth, 0, TelescopeList.RCX400, "2.2I")] + [TestCase(GuideDirections.guideSouth, 0, TelescopeList.RCX400, "2.2I")] + [TestCase(GuideDirections.guideEast, 22161, TelescopeList.RCX400, "2.2I")] + [TestCase(GuideDirections.guideWest, 22161, TelescopeList.RCX400, "2.2I")] + [TestCase(GuideDirections.guideNorth, 22161, TelescopeList.RCX400, "2.2I")] + [TestCase(GuideDirections.guideSouth, 22161, TelescopeList.RCX400, "2.2I")] + [TestCase(GuideDirections.guideEast, 0, TelescopeList.Autostar497, "43EG")] + [TestCase(GuideDirections.guideWest, 0, TelescopeList.Autostar497, "43EG")] + [TestCase(GuideDirections.guideNorth, 0, TelescopeList.Autostar497, "43EG")] + [TestCase(GuideDirections.guideSouth, 0, TelescopeList.Autostar497, "43EG")] + [TestCase(GuideDirections.guideEast, 22161, TelescopeList.Autostar497, "43EG")] + [TestCase(GuideDirections.guideWest, 22161, TelescopeList.Autostar497, "43EG")] + [TestCase(GuideDirections.guideNorth, 22161, TelescopeList.Autostar497, "43EG")] + [TestCase(GuideDirections.guideSouth, 22161, TelescopeList.Autostar497, "43EG")] + public void PulseGuide_WhenConnectedInAlTAzModeAndUsingStarGPSFirmware_ThenSendsNewCommandsAndWaits(GuideDirections direction, int duration, string product, string firmware) + { + ConnectTelescope(product, firmware, "AT0"); + + _telescope.PulseGuide(direction, duration); + + string d = string.Empty; + switch (direction) + { + case GuideDirections.guideEast: + d = "e"; + break; + case GuideDirections.guideWest: + d = "w"; + break; + case GuideDirections.guideNorth: + d = "n"; + break; + case GuideDirections.guideSouth: + d = "s"; + break; + } + + _sharedResourcesWrapperMock.Verify(x => x.SendBlind($"Mg{d}{duration:0000}", false)); + _utilMock.Verify(x => x.WaitForMilliseconds(duration), Times.Once); + } + [TestCase(GuideDirections.guideEast)] [TestCase(GuideDirections.guideWest)] [TestCase(GuideDirections.guideNorth)] diff --git a/Meade.net/TelescopeList.cs b/Meade.net/TelescopeList.cs index 1f5f99e..082ed89 100644 --- a/Meade.net/TelescopeList.cs +++ b/Meade.net/TelescopeList.cs @@ -23,9 +23,9 @@ // ReSharper disable once InconsistentNaming public const string LX200GPS = "LX2001"; - public const string LX200GPS_42F = "4.2F"; + public const string LX200GPS_42F = "4.2f"; // ReSharper disable once InconsistentNaming - public const string LX200GPS_42G = "4.2G"; + public const string LX200GPS_42G = "4.2g"; #endregion #region LX200EMC