diff --git a/Meade.net.Telescope/Telescope.cs b/Meade.net.Telescope/Telescope.cs index 8a555fe..e74f794 100644 --- a/Meade.net.Telescope/Telescope.cs +++ b/Meade.net.Telescope/Telescope.cs @@ -3496,15 +3496,7 @@ namespace ASCOM.Meade.net if (value >= 24) throw new InvalidValueException("Right ascension value cannot be greater than 23:59:59"); - string hms; - try - { - hms = SetTargetRightAscension(value, SharedResourcesWrapper.IsLongFormat); - } - catch(InvalidOperationException) - { - hms = SetTargetRightAscension(value, !SharedResourcesWrapper.IsLongFormat); - } + var hms = SetTargetRightAscension(value, SharedResourcesWrapper.IsLongFormat); SharedResourcesWrapper.TargetRightAscension = _utilities.HMSToHours(hms); } @@ -3522,6 +3514,8 @@ namespace ASCOM.Meade.net ? _utilities.HoursToHMS(value, ":", ":", ":", _digitsRa) : _utilities.HoursToHM(value, ":", "", _digitsRa).Replace(',', '.'); + hms = hms.TrimEnd(':'); + var command = $"Sr{hms}"; LogMessage("TargetRightAscension Set", $"{command}"); var response = SharedResourcesWrapper.SendChar(Tl, command);