Added pseudocode for detecting StarPatch firmware

This commit is contained in:
2022-06-27 21:55:09 +01:00
parent 0806696d30
commit 9b2818ddba
+16
View File
@@ -489,6 +489,7 @@ namespace ASCOM.Meade.net
$"Connected to port {_profileProperties.ComPort}. Product: {SharedResourcesWrapper.ProductName} Version:{SharedResourcesWrapper.FirmwareVersion}"); $"Connected to port {_profileProperties.ComPort}. Product: {SharedResourcesWrapper.ProductName} Version:{SharedResourcesWrapper.FirmwareVersion}");
_useNewerPulseGuiding = IsNewPulseGuidingSupported(); _useNewerPulseGuiding = IsNewPulseGuidingSupported();
_isStarPatch = IsStarPatch();
LogMessage("Connected Set", $"New Pulse Guiding Supported: {_useNewerPulseGuiding}"); LogMessage("Connected Set", $"New Pulse Guiding Supported: {_useNewerPulseGuiding}");
IsConnected = true; 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) private void SendCurrentDateTime(string connect)
{ {
if (_profileProperties.SendDateTime) if (_profileProperties.SendDateTime)
@@ -1529,6 +1541,9 @@ namespace ASCOM.Meade.net
if (_useNewerPulseGuiding) if (_useNewerPulseGuiding)
canPulseGuide = AlignmentMode != AlignmentModes.algAltAz; canPulseGuide = AlignmentMode != AlignmentModes.algAltAz;
if (_isStarPatch)
canPulseGuide = true;
LogMessage("CanPulseGuide", $"Get - {canPulseGuide}"); LogMessage("CanPulseGuide", $"Get - {canPulseGuide}");
return canPulseGuide; return canPulseGuide;
} }
@@ -2290,6 +2305,7 @@ namespace ASCOM.Meade.net
} }
private bool _useNewerPulseGuiding = true; private bool _useNewerPulseGuiding = true;
private bool _isStarPatch = false;
public void PulseGuide(GuideDirections direction, int duration) public void PulseGuide(GuideDirections direction, int duration)
{ {