Fixed the log message to be returned from IsSlewing with the final state every time without exception.

This commit is contained in:
2021-01-17 18:19:16 +00:00
parent 65afa07125
commit 927d6bce47
+7 -3
View File
@@ -1982,7 +1982,8 @@ namespace ASCOM.Meade.net
//Autostars and Autostar II a string containing one bar until a slew is complete, then a null string is returned.
bool isSlewing = !string.IsNullOrEmpty(result);
try
{
if (!isSlewing)
return false;
@@ -1996,8 +1997,6 @@ namespace ASCOM.Meade.net
if (!isSlewing)
return isSlewing;
LogMessage("IsSlewingToTarget", $"Result = {isSlewing}");
//classic LX200 got RA 0 DE 0 as Target Coordinates. If the RA DE is not 0 at switch on, the telescope will indicate slewing until
//the target coordinates are set and the telescope is slewed to that position.
//a 0 movement will solved that lock if the target coordinates are set to the current coordinates.
@@ -2006,6 +2005,11 @@ namespace ASCOM.Meade.net
return isSlewing;
}
finally
{
LogMessage("IsSlewingToTarget", $"Result = {isSlewing}");
}
}
public void SyncToAltAz(double azimuth, double altitude)
{