From c673e0c7d6005e3af43e90f4688e7013c476f6fb Mon Sep 17 00:00:00 2001 From: Colin Dawson Date: Sat, 18 Feb 2023 22:37:47 +0000 Subject: [PATCH 1/3] . doing the trim of the trailing # after writing the log message. . for LX800 scopes, trying to use a send string instead of send chars for GW command. --- Meade.net.Telescope/Telescope.cs | 9 ++++++++- Meade.net/SharedResources.cs | 4 ++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Meade.net.Telescope/Telescope.cs b/Meade.net.Telescope/Telescope.cs index 5d1bc68..1930254 100644 --- a/Meade.net.Telescope/Telescope.cs +++ b/Meade.net.Telescope/Telescope.cs @@ -428,7 +428,14 @@ namespace ASCOM.Meade.net // https://bitbucket.org/cjdskunkworks/meadeautostar497/issues/24/get-set-tracking#comment-60586901 if (command == (raw ? ":GW#" : "GW")) { - result = SharedResourcesWrapper.SendChars(Tl, command, raw, count: 3); + switch (SharedResourcesWrapper.ProductName) + { + case TelescopeList.LX800: + result = SharedResourcesWrapper.SendString(Tl, command, raw); + break; + default: + result = SharedResourcesWrapper.SendChars(Tl, command, raw, count: 3); + } } else { diff --git a/Meade.net/SharedResources.cs b/Meade.net/SharedResources.cs index dbf74cd..03fcf3d 100644 --- a/Meade.net/SharedResources.cs +++ b/Meade.net/SharedResources.cs @@ -111,9 +111,9 @@ namespace ASCOM.Meade.net try { - var result = SharedSerial.ReceiveTerminated("#").TrimEnd('#'); + var result = SharedSerial.ReceiveTerminated("#"); traceLogger.LogMessage("SendString", $"Received {result}", false); - return result; + return result.TrimEnd('#'); } catch (COMException ex) { From 003dbe059a90c196043dd2bad9ac748b8c3aef3a Mon Sep 17 00:00:00 2001 From: Colin Dawson Date: Sat, 18 Feb 2023 22:50:57 +0000 Subject: [PATCH 2/3] . doing the trim of the trailing # after writing the log message. . for LX800 scopes, trying to use a send string instead of send chars for GW command. --- Meade.net.Telescope/Telescope.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Meade.net.Telescope/Telescope.cs b/Meade.net.Telescope/Telescope.cs index 1930254..c561440 100644 --- a/Meade.net.Telescope/Telescope.cs +++ b/Meade.net.Telescope/Telescope.cs @@ -435,6 +435,7 @@ namespace ASCOM.Meade.net break; default: result = SharedResourcesWrapper.SendChars(Tl, command, raw, count: 3); + break; } } else From 4c7a40a8e4daadaa08d82ebe95b515c6dc85fea7 Mon Sep 17 00:00:00 2001 From: Colin Dawson Date: Wed, 22 Feb 2023 22:14:38 +0000 Subject: [PATCH 3/3] Added extra values to GW translation. Also added extra log message that includes the hour angle when calculating the destination side of pier. --- Meade.net.Telescope/Telescope.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Meade.net.Telescope/Telescope.cs b/Meade.net.Telescope/Telescope.cs index c561440..a364626 100644 --- a/Meade.net.Telescope/Telescope.cs +++ b/Meade.net.Telescope/Telescope.cs @@ -1244,6 +1244,12 @@ namespace ASCOM.Meade.net case 'P': alignmentStatus.Status = Alignment.ScopeWasParked; break; + case '4': // 4 - Aligned on Home *** Starlock mounts + alignmentStatus.Status = Alignment.AlignedOnHome; + break; + case '5':// 5 - Scope was parked *** Starlock mounts + alignmentStatus.Status = Alignment.ScopeWasParked; + break; } LogMessage("GetScopeAlignmentStatus", $"Result {alignmentStatus}"); @@ -1897,6 +1903,8 @@ namespace ASCOM.Meade.net var destinationSOP = hourAngle > 0 ? PierSide.pierEast : PierSide.pierWest; + + LogMessage("CalculateSideOfPier", $"destination side of pier: {destinationSOP} ha: {hourAngle}"); return destinationSOP; }