From 9b2818ddbaa265d17895195cceddd1acd2a517dd Mon Sep 17 00:00:00 2001 From: Colin Dawson Date: Mon, 27 Jun 2022 21:55:09 +0100 Subject: [PATCH] Added pseudocode for detecting StarPatch firmware --- Meade.net.Telescope/Telescope.cs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/Meade.net.Telescope/Telescope.cs b/Meade.net.Telescope/Telescope.cs index 0578ed8..33981c2 100644 --- a/Meade.net.Telescope/Telescope.cs +++ b/Meade.net.Telescope/Telescope.cs @@ -489,6 +489,7 @@ namespace ASCOM.Meade.net $"Connected to port {_profileProperties.ComPort}. Product: {SharedResourcesWrapper.ProductName} Version:{SharedResourcesWrapper.FirmwareVersion}"); _useNewerPulseGuiding = IsNewPulseGuidingSupported(); + _isStarPatch = IsStarPatch(); LogMessage("Connected Set", $"New Pulse Guiding Supported: {_useNewerPulseGuiding}"); IsConnected = true; @@ -599,6 +600,17 @@ namespace ASCOM.Meade.net } } + private bool IsStarPatch() + { + //Todo add tests to see if the firmware is star patch. + //Check if last character is a letter + // lower case = Meade, upper case = StarPatch + //If last character is a number + // Get case of second to last character + // lower case = StarPatch, upper case = Meade + return false; + } + private void SendCurrentDateTime(string connect) { if (_profileProperties.SendDateTime) @@ -1528,7 +1540,10 @@ namespace ASCOM.Meade.net if (_useNewerPulseGuiding) canPulseGuide = AlignmentMode != AlignmentModes.algAltAz; - + + if (_isStarPatch) + canPulseGuide = true; + LogMessage("CanPulseGuide", $"Get - {canPulseGuide}"); return canPulseGuide; } @@ -2290,6 +2305,7 @@ namespace ASCOM.Meade.net } private bool _useNewerPulseGuiding = true; + private bool _isStarPatch = false; public void PulseGuide(GuideDirections direction, int duration) {