Tried trimming a traingin : if it exists, that should not be part of the command sent to the scope.

This commit is contained in:
2022-11-10 14:43:41 +00:00
parent 1e5bb04817
commit e93da73431
+3 -9
View File
@@ -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);