Changes the low precision target so that it's using seconds, instead of a fraction of a minute for the seconds portion of the coordinates.
This commit is contained in:
@@ -1041,8 +1041,9 @@ namespace Meade.net.Telescope.UnitTests
|
|||||||
var ra = 12d;
|
var ra = 12d;
|
||||||
var dec = 34d;
|
var dec = 34d;
|
||||||
|
|
||||||
_utilMock.Setup(x => x.HoursToHM(ra, ":", "", 1)).Returns(ra + "HM");
|
_utilMock.Setup(x => x.HoursToHMS(ra, ":", ":", ":", 0)).Returns(ra + "HM");
|
||||||
_utilMock.Setup(x => x.DegreesToDM(dec, "*", "", 0)).Returns(dec + "DM");
|
_utilMock.Setup(x => x.DegreesToDMS(dec, "*", ":", ":", 0)).Returns(dec + "DM");
|
||||||
|
_utilMock.Setup(x => x.DMSToDegrees(_testProperties.TelescopeRaResult)).Returns(_testProperties.Declination);
|
||||||
|
|
||||||
ConnectTelescope(TelescopeList.LX200CLASSIC);
|
ConnectTelescope(TelescopeList.LX200CLASSIC);
|
||||||
|
|
||||||
@@ -1063,8 +1064,8 @@ namespace Meade.net.Telescope.UnitTests
|
|||||||
secondTelescopeInstance.TargetRightAscension = ra;
|
secondTelescopeInstance.TargetRightAscension = ra;
|
||||||
secondTelescopeInstance.TargetDeclination = dec;
|
secondTelescopeInstance.TargetDeclination = dec;
|
||||||
|
|
||||||
_utilMock.Verify(x => x.HoursToHM(ra, ":", "", 1), Times.Exactly(2));
|
_utilMock.Verify(x => x.HoursToHMS(ra, ":", ":", ":", 0), Times.Exactly(2));
|
||||||
_utilMock.Verify(x => x.DegreesToDM(dec, "*", "", 0), Times.Exactly(2));
|
_utilMock.Verify(x => x.DegreesToDMS(dec, "*", ":", ":", 0), Times.Exactly(2));
|
||||||
_utilMock.Verify(x => x.HoursToHMS(It.IsAny<double>(), It.IsAny<string>(), It.IsAny<string>(), It.IsAny<string>(), 2), Times.Never);
|
_utilMock.Verify(x => x.HoursToHMS(It.IsAny<double>(), It.IsAny<string>(), It.IsAny<string>(), It.IsAny<string>(), 2), Times.Never);
|
||||||
_utilMock.Verify(x => x.DegreesToDMS(It.IsAny<double>(), It.IsAny<string>(), It.IsAny<string>(), It.IsAny<string>(), 2), Times.Never);
|
_utilMock.Verify(x => x.DegreesToDMS(It.IsAny<double>(), It.IsAny<string>(), It.IsAny<string>(), It.IsAny<string>(), 2), Times.Never);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1747,10 +1747,11 @@ namespace ASCOM.Meade.net
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
CheckConnected("CanUnpark");
|
CheckConnected("CanUnpark");
|
||||||
|
var canUnPark = IsUnparkable;
|
||||||
|
|
||||||
LogMessage("CanUnpark", "Get - " + true);
|
LogMessage("CanUnpark", "Get - " + canUnPark);
|
||||||
|
|
||||||
return IsUnparkable;
|
return canUnPark;
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
@@ -3448,7 +3449,8 @@ namespace ASCOM.Meade.net
|
|||||||
{
|
{
|
||||||
var dms = useLongFormat
|
var dms = useLongFormat
|
||||||
? _utilities.DegreesToDMS(value, "*", ":", ":", _digitsDe)
|
? _utilities.DegreesToDMS(value, "*", ":", ":", _digitsDe)
|
||||||
: _utilities.DegreesToDM(value, "*", "", _digitsDe);
|
//: _utilities.DegreesToDM(value, "*", "", _digitsDe);
|
||||||
|
: _utilities.DegreesToDMS(value, "*", ":", ":", 0);
|
||||||
|
|
||||||
var s = value < 0 ? string.Empty : "+";
|
var s = value < 0 ? string.Empty : "+";
|
||||||
|
|
||||||
@@ -3535,7 +3537,8 @@ namespace ASCOM.Meade.net
|
|||||||
{
|
{
|
||||||
var hms = useLongFormat
|
var hms = useLongFormat
|
||||||
? _utilities.HoursToHMS(value, ":", ":", ":", _digitsRa)
|
? _utilities.HoursToHMS(value, ":", ":", ":", _digitsRa)
|
||||||
: _utilities.HoursToHM(value, ":", "", _digitsRa).Replace(',', '.');
|
//: _utilities.HoursToHM(value, ":", "", _digitsRa).Replace(',', '.');
|
||||||
|
: _utilities.HoursToHMS(value, ":", ":", ":", 0);
|
||||||
|
|
||||||
hms = hms.TrimEnd(':');
|
hms = hms.TrimEnd(':');
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user