diff --git a/Meade.net.Telescope/Telescope.cs b/Meade.net.Telescope/Telescope.cs index d0ebdd7..ada8098 100644 --- a/Meade.net.Telescope/Telescope.cs +++ b/Meade.net.Telescope/Telescope.cs @@ -1341,10 +1341,7 @@ namespace ASCOM.Meade.net private bool _movingPrimary; private bool _movingSecondary; - - private double _primaryRate; - private double _secondaryRate; - + public void MoveAxis(TelescopeAxes axis, double rate) { LogMessage("MoveAxis", $"Axis={axis} rate={rate}"); @@ -1387,9 +1384,8 @@ namespace ASCOM.Meade.net switch (rate.Compare(0)) { case ComparisonResult.Equals: - if (_primaryRate > 1) + if (!_isGuiding) { - //We're going faster than Guide speed, so need to wait for the scope to settle. SetSlewingMinEndTime(); } @@ -1400,21 +1396,18 @@ namespace ASCOM.Meade.net SharedResourcesWrapper.SendBlind(":Qw#"); //:Qw# Halt westward Slews //Returns: Nothing - _primaryRate = 0; break; case ComparisonResult.Greater: SharedResourcesWrapper.SendBlind(":Me#"); //:Me# Move Telescope East at current slew rate //Returns: Nothing _movingPrimary = true; - _primaryRate = absRate; break; case ComparisonResult.Lower: SharedResourcesWrapper.SendBlind(":Mw#"); //:Mw# Move Telescope West at current slew rate //Returns: Nothing _movingPrimary = true; - _primaryRate = absRate; break; } break; @@ -1422,9 +1415,8 @@ namespace ASCOM.Meade.net switch (rate.Compare(0)) { case ComparisonResult.Equals: - if (_secondaryRate > 1) + if (!_isGuiding) { - //We're going faster than Guide speed, so need to wait for the scope to settle. SetSlewingMinEndTime(); } _movingSecondary = false; @@ -1434,26 +1426,20 @@ namespace ASCOM.Meade.net SharedResourcesWrapper.SendBlind(":Qs#"); //:Qs# Halt southward Slews //Returns: Nothing - - _secondaryRate = 0; break; case ComparisonResult.Greater: SharedResourcesWrapper.SendBlind(":Mn#"); //:Mn# Move Telescope North at current slew rate //Returns: Nothing _movingSecondary = true; - _secondaryRate = absRate; break; case ComparisonResult.Lower: SharedResourcesWrapper.SendBlind(":Ms#"); //:Ms# Move Telescope South at current slew rate //Returns: Nothing _movingSecondary = true; - _secondaryRate = absRate; break; - } - break; default: throw new InvalidValueException("Can not move this axis.");