From c673e0c7d6005e3af43e90f4688e7013c476f6fb Mon Sep 17 00:00:00 2001 From: Colin Dawson Date: Sat, 18 Feb 2023 22:37:47 +0000 Subject: [PATCH] . 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) {