From 3b056ef7f8dc596814d688757868ecdaa153ccc2 Mon Sep 17 00:00:00 2001 From: Colin Dawson Date: Fri, 17 Sep 2021 09:38:35 +0100 Subject: [PATCH] Fixed bug in tracking rate get where it always returns lunar when it should be sidereal --- Meade.net.Telescope.UnitTests/TelescopeUnitTests.cs | 2 +- Meade.net.Telescope/Telescope.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Meade.net.Telescope.UnitTests/TelescopeUnitTests.cs b/Meade.net.Telescope.UnitTests/TelescopeUnitTests.cs index 2180770..b33b9d7 100644 --- a/Meade.net.Telescope.UnitTests/TelescopeUnitTests.cs +++ b/Meade.net.Telescope.UnitTests/TelescopeUnitTests.cs @@ -142,7 +142,7 @@ namespace Meade.net.Telescope.UnitTests _sharedResourcesWrapperMock.Setup(x => x.SendString("GL", false)).Returns(() => _testProperties.telescopeTime); _sharedResourcesWrapperMock.Setup(x => x.SendString("GG", false)).Returns(() => _testProperties.telescopeUtcCorrection); - const string siderealTrackingRate = "60.1"; + const string siderealTrackingRate = "+60.1"; _testProperties.TrackingRate = siderealTrackingRate; _sharedResourcesWrapperMock.Setup(x => x.SendString("GT", false)).Returns(() => _testProperties.TrackingRate); _sharedResourcesWrapperMock.Setup(x => x.SendBlind("TL", false)).Callback(() => _testProperties.TrackingRate = "lunar"); diff --git a/Meade.net.Telescope/Telescope.cs b/Meade.net.Telescope/Telescope.cs index f35dfcc..0fe0260 100644 --- a/Meade.net.Telescope/Telescope.cs +++ b/Meade.net.Telescope/Telescope.cs @@ -2645,7 +2645,7 @@ namespace ASCOM.Meade.net //Current Track Frequency expressed in hertz assuming a synchonous motor design where a 60.0 Hz motor clock // would produce 1 revolution of the telescope in 24 hours. - DriveRates result = rate == "60.1" ? DriveRates.driveSidereal : DriveRates.driveLunar; + DriveRates result = rate == "+60.1" ? DriveRates.driveSidereal : DriveRates.driveLunar; LogMessage("TrackingRate Get", $"{rate} {result}");