Adding some experimental support for the LX-200 EMC

This commit is contained in:
2019-09-30 22:10:00 +01:00
parent f33ca49592
commit a61915a3b5
3 changed files with 46 additions and 5 deletions
+18 -2
View File
@@ -456,6 +456,15 @@ namespace ASCOM.Meade.net
return false;
}
private bool IsLongFormatSupported()
{
if (_sharedResourcesWrapper.ProductName == TelescopeList.LX200CLASSIC)
{
return false;
}
return true;
}
private bool IsGuideRateSettingSupported()
{
if (_sharedResourcesWrapper.ProductName == TelescopeList.LX200GPS)
@@ -472,8 +481,15 @@ namespace ASCOM.Meade.net
return comparison >= 0;
}
public bool IsLongFormat { get; private set; }
public void SetLongFormat(bool setLongFormat)
{
IsLongFormat = false;
if (!IsLongFormatSupported())
return;
_sharedResourcesWrapper.Lock(() =>
{
var result = _sharedResourcesWrapper.SendString(":GZ#");
@@ -481,9 +497,9 @@ namespace ASCOM.Meade.net
//Returns: DDD*MM# or DDD*MMSS#
//The current telescope Azimuth depending on the selected precision.
bool isLongFormat = result.Length > 6;
IsLongFormat = result.Length > 6;
if (isLongFormat != setLongFormat)
if (IsLongFormat != setLongFormat)
{
_utilities.WaitForMilliseconds(500);
_sharedResourcesWrapper.SendBlind(":U#");