Added ability to unpark the LX200 Classic
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
@@ -1433,7 +1434,14 @@ namespace ASCOM.Meade.net
|
|||||||
CheckConnected("CanUnpark");
|
CheckConnected("CanUnpark");
|
||||||
|
|
||||||
LogMessage("CanUnpark", "Get - " + true);
|
LogMessage("CanUnpark", "Get - " + true);
|
||||||
return SharedResourcesWrapper.ProductName == TelescopeList.LX200GPS;
|
|
||||||
|
var unParkableScopes = new List<string>
|
||||||
|
{
|
||||||
|
TelescopeList.LX200GPS,
|
||||||
|
TelescopeList.LX200CLASSIC
|
||||||
|
};
|
||||||
|
|
||||||
|
return unParkableScopes.Contains(SharedResourcesWrapper.ProductName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2788,6 +2796,8 @@ namespace ASCOM.Meade.net
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private AlignmentModes _savedAlignmode;
|
||||||
|
|
||||||
public bool Tracking
|
public bool Tracking
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -2811,7 +2821,16 @@ namespace ASCOM.Meade.net
|
|||||||
//}
|
//}
|
||||||
|
|
||||||
LogMessage("Tracking Set", $"{value}");
|
LogMessage("Tracking Set", $"{value}");
|
||||||
SharedResourcesWrapper.SendBlind(value ? "AP" : "AL"); //todo need to route this to the real commands.
|
|
||||||
|
if (!value)
|
||||||
|
{
|
||||||
|
_savedAlignmode = AlignmentMode;
|
||||||
|
SharedResourcesWrapper.SendBlind("AL");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
AlignmentMode = _savedAlignmode;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3014,17 +3033,25 @@ namespace ASCOM.Meade.net
|
|||||||
LogMessage("Unpark", "Unparking telescope");
|
LogMessage("Unpark", "Unparking telescope");
|
||||||
CheckConnected("Unpark");
|
CheckConnected("Unpark");
|
||||||
|
|
||||||
if (SharedResourcesWrapper.ProductName != TelescopeList.LX200GPS)
|
if (!IsUnParkable())
|
||||||
throw new InvalidOperationException("Unable to unpark this telescope type");
|
throw new InvalidOperationException("Unable to unpark this telescope type");
|
||||||
|
|
||||||
if (!AtPark)
|
if (!AtPark)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (SharedResourcesWrapper.ProductName == TelescopeList.LX200GPS)
|
||||||
|
{
|
||||||
|
|
||||||
SharedResourcesWrapper.SendChar("I");
|
SharedResourcesWrapper.SendChar("I");
|
||||||
//:I# LX200 GPS Only - Causes the telescope to cease current operations and restart at its power on initialization.
|
//:I# LX200 GPS Only - Causes the telescope to cease current operations and restart at its power on initialization.
|
||||||
//Returns: X once the handset restart has completed
|
//Returns: X once the handset restart has completed
|
||||||
|
|
||||||
BypassHandboxEntryForAutostarII();
|
BypassHandboxEntryForAutostarII();
|
||||||
|
}
|
||||||
|
else if (SharedResourcesWrapper.ProductName == TelescopeList.LX200CLASSIC)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
SharedResourcesWrapper.SetParked(false, null);
|
SharedResourcesWrapper.SetParked(false, null);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user