Implemented slew to target
This commit is contained in:
@@ -804,14 +804,14 @@ namespace ASCOM.MeadeAutostar497
|
|||||||
|
|
||||||
public void SlewToTarget()
|
public void SlewToTarget()
|
||||||
{
|
{
|
||||||
tl.LogMessage("SlewToTarget", "Not implemented");
|
tl.LogMessage("SlewToTarget", "Executing");
|
||||||
throw new ASCOM.MethodNotImplementedException("SlewToTarget");
|
_telescopeController.SlewToTarget();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SlewToTargetAsync()
|
public void SlewToTargetAsync()
|
||||||
{
|
{
|
||||||
tl.LogMessage("SlewToTargetAsync", "Not implemented");
|
tl.LogMessage("SlewToTargetAsync", "Executing");
|
||||||
throw new ASCOM.MethodNotImplementedException("SlewToTargetAsync");
|
_telescopeController.SlewToTargetAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool Slewing
|
public bool Slewing
|
||||||
|
|||||||
@@ -28,5 +28,7 @@ namespace ASCOM.MeadeAutostar497.Controller
|
|||||||
void SlewToAltAz(double azimuth, double altitude);
|
void SlewToAltAz(double azimuth, double altitude);
|
||||||
void SlewToAltAzAsync(double azimuth, double altitude);
|
void SlewToAltAzAsync(double azimuth, double altitude);
|
||||||
void SyncToTarget();
|
void SyncToTarget();
|
||||||
|
void SlewToTarget();
|
||||||
|
void SlewToTargetAsync();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -633,6 +633,24 @@ namespace ASCOM.MeadeAutostar497.Controller
|
|||||||
throw new ASCOM.InvalidOperationException("Unable to perform sync");
|
throw new ASCOM.InvalidOperationException("Unable to perform sync");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void SlewToTarget()
|
||||||
|
{
|
||||||
|
SlewToTargetAsync();
|
||||||
|
|
||||||
|
while (Slewing)
|
||||||
|
{
|
||||||
|
Util.WaitForMilliseconds(200);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SlewToTargetAsync()
|
||||||
|
{
|
||||||
|
if (TargetDeclination == INVALID_PARAMETER || TargetRightAscension == INVALID_PARAMETER )
|
||||||
|
throw new ASCOM.InvalidOperationException("No target selected to slew to.");
|
||||||
|
|
||||||
|
DoSlewAsync(true);
|
||||||
|
}
|
||||||
|
|
||||||
//todo remove the polar parameter and split method into two.
|
//todo remove the polar parameter and split method into two.
|
||||||
private void DoSlewAsync( bool polar)
|
private void DoSlewAsync( bool polar)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user