Taken out the ability to get or set the guide rates, as there doesn't appear to be a method to read the guide rates in the meade command set.
This commit is contained in:
@@ -643,7 +643,8 @@ namespace Meade.net.Telescope.UnitTests
|
|||||||
|
|
||||||
var result = _telescope.CanSetGuideRates;
|
var result = _telescope.CanSetGuideRates;
|
||||||
|
|
||||||
Assert.That(result, Is.True);
|
//Assert.That(result, Is.True);
|
||||||
|
Assert.That(result, Is.False);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
@@ -832,7 +833,7 @@ namespace Meade.net.Telescope.UnitTests
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void GuideRateDeclination_Set_ThenThrowsException()
|
public void GuideRateDeclination_Set_WhenNotSupported_ThenThrowsException()
|
||||||
{
|
{
|
||||||
_sharedResourcesWrapperMock.Setup(x => x.ProductName).Returns(() => TelescopeList.Autostar497);
|
_sharedResourcesWrapperMock.Setup(x => x.ProductName).Returns(() => TelescopeList.Autostar497);
|
||||||
|
|
||||||
@@ -842,19 +843,19 @@ namespace Meade.net.Telescope.UnitTests
|
|||||||
Assert.That(excpetion.AccessorSet, Is.True);
|
Assert.That(excpetion.AccessorSet, Is.True);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
//[Test]
|
||||||
public void GuideRateDeclination_Set_WhenIsSupported_ThenSetsNewGuideRate()
|
//public void GuideRateDeclination_Set_WhenIsSupported_ThenSetsNewGuideRate()
|
||||||
{
|
//{
|
||||||
var newGuideRate = 10;
|
// var newGuideRate = 10;
|
||||||
|
|
||||||
_sharedResourcesWrapperMock.Setup(x => x.ProductName).Returns(() => TelescopeList.LX200GPS);
|
// _sharedResourcesWrapperMock.Setup(x => x.ProductName).Returns(() => TelescopeList.LX200GPS);
|
||||||
|
|
||||||
_telescope.GuideRateDeclination = newGuideRate;
|
// _telescope.GuideRateDeclination = newGuideRate;
|
||||||
|
|
||||||
_sharedResourcesWrapperMock.Verify( x => x.SendBlind(":Rg10.0#"),Times.Once);
|
// _sharedResourcesWrapperMock.Verify( x => x.SendBlind(":Rg10.0#"),Times.Once);
|
||||||
|
|
||||||
Assert.That(_telescope.GuideRateDeclination, Is.EqualTo(newGuideRate));
|
// Assert.That(_telescope.GuideRateDeclination, Is.EqualTo(newGuideRate));
|
||||||
}
|
//}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void GuideRateRightAscension_Get_ThenThrowsException()
|
public void GuideRateRightAscension_Get_ThenThrowsException()
|
||||||
@@ -865,7 +866,7 @@ namespace Meade.net.Telescope.UnitTests
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void GuideRateRightAscension_Set_ThenThrowsException()
|
public void GuideRateRightAscension_Set_WhenNotSupported_ThenThrowsException()
|
||||||
{
|
{
|
||||||
_sharedResourcesWrapperMock.Setup(x => x.ProductName).Returns(() => TelescopeList.Autostar497);
|
_sharedResourcesWrapperMock.Setup(x => x.ProductName).Returns(() => TelescopeList.Autostar497);
|
||||||
|
|
||||||
@@ -875,19 +876,19 @@ namespace Meade.net.Telescope.UnitTests
|
|||||||
Assert.That(excpetion.AccessorSet, Is.True);
|
Assert.That(excpetion.AccessorSet, Is.True);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
//[Test]
|
||||||
public void GuideRateRightAscension_Set_WhenIsSupported_ThenSetsNewGuideRate()
|
//public void GuideRateRightAscension_Set_WhenIsSupported_ThenSetsNewGuideRate()
|
||||||
{
|
//{
|
||||||
var newGuideRate = 10;
|
// var newGuideRate = 10;
|
||||||
|
|
||||||
_sharedResourcesWrapperMock.Setup(x => x.ProductName).Returns(() => TelescopeList.LX200GPS);
|
// _sharedResourcesWrapperMock.Setup(x => x.ProductName).Returns(() => TelescopeList.LX200GPS);
|
||||||
|
|
||||||
_telescope.GuideRateRightAscension = newGuideRate;
|
// _telescope.GuideRateRightAscension = newGuideRate;
|
||||||
|
|
||||||
_sharedResourcesWrapperMock.Verify(x => x.SendBlind(":Rg10.0#"), Times.Once);
|
// _sharedResourcesWrapperMock.Verify(x => x.SendBlind(":Rg10.0#"), Times.Once);
|
||||||
|
|
||||||
Assert.That(_telescope.GuideRateDeclination, Is.EqualTo(newGuideRate));
|
// Assert.That(_telescope.GuideRateDeclination, Is.EqualTo(newGuideRate));
|
||||||
}
|
//}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void IsPulseGuiding_Get_ReturnsFalse()
|
public void IsPulseGuiding_Get_ReturnsFalse()
|
||||||
|
|||||||
@@ -375,14 +375,15 @@ namespace ASCOM.Meade.net
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool IsGuideRateSettingSupported()
|
//todo implement ability to read and write the guide rate from the telescope.
|
||||||
{
|
//private bool IsGuideRateSettingSupported()
|
||||||
if (_sharedResourcesWrapper.ProductName == TelescopeList.LX200GPS)
|
//{
|
||||||
{
|
// if (_sharedResourcesWrapper.ProductName == TelescopeList.LX200GPS)
|
||||||
return true;
|
// {
|
||||||
}
|
// return true;
|
||||||
return false;
|
// }
|
||||||
}
|
// return false;
|
||||||
|
//}
|
||||||
|
|
||||||
private bool FirmwareIsGreaterThan(string minVersion)
|
private bool FirmwareIsGreaterThan(string minVersion)
|
||||||
{
|
{
|
||||||
@@ -757,7 +758,8 @@ namespace ASCOM.Meade.net
|
|||||||
{
|
{
|
||||||
CheckConnected("CanSetGuideRates Get");
|
CheckConnected("CanSetGuideRates Get");
|
||||||
|
|
||||||
var canSetGuideRate = IsGuideRateSettingSupported();
|
//var canSetGuideRate = IsGuideRateSettingSupported();
|
||||||
|
var canSetGuideRate = false;
|
||||||
|
|
||||||
LogMessage("CanSetGuideRates", "Get - " + canSetGuideRate.ToString());
|
LogMessage("CanSetGuideRates", "Get - " + canSetGuideRate.ToString());
|
||||||
return canSetGuideRate;
|
return canSetGuideRate;
|
||||||
@@ -943,25 +945,25 @@ namespace ASCOM.Meade.net
|
|||||||
|
|
||||||
private void SetNewGuideRate(double value, string propertyName)
|
private void SetNewGuideRate(double value, string propertyName)
|
||||||
{
|
{
|
||||||
if (!IsGuideRateSettingSupported())
|
//if (!IsGuideRateSettingSupported())
|
||||||
{
|
//{
|
||||||
LogMessage("GuideRateDeclination Set", "Not implemented");
|
LogMessage("GuideRateDeclination Set", "Not implemented");
|
||||||
throw new PropertyNotImplementedException(propertyName, true);
|
throw new PropertyNotImplementedException(propertyName, true);
|
||||||
}
|
//}
|
||||||
|
|
||||||
if (!value.InRange(0, 15.0417))
|
//if (!value.InRange(0, 15.0417))
|
||||||
{
|
//{
|
||||||
throw new InvalidValueException(propertyName, value.ToString(), "0 to 15.0417”/sec");
|
// throw new InvalidValueException(propertyName, value.ToString(), "0 to 15.0417”/sec");
|
||||||
}
|
//}
|
||||||
|
|
||||||
_sharedResourcesWrapper.SendBlind($":Rg{value:00.0}#");
|
//_sharedResourcesWrapper.SendBlind($":Rg{value:00.0}#");
|
||||||
//:RgSS.S#
|
////:RgSS.S#
|
||||||
//Set guide rate to +/ -SS.S to arc seconds per second.This rate is added to or subtracted from the current tracking
|
////Set guide rate to +/ -SS.S to arc seconds per second.This rate is added to or subtracted from the current tracking
|
||||||
//Rates when the CCD guider or handbox guider buttons are pressed when the guide rate is selected.Rate shall not exceed
|
////Rates when the CCD guider or handbox guider buttons are pressed when the guide rate is selected.Rate shall not exceed
|
||||||
//sidereal speed(approx 15.0417”/sec)[Autostar II only]
|
////sidereal speed(approx 15.0417”/sec)[Autostar II only]
|
||||||
//Returns: Nothing
|
////Returns: Nothing
|
||||||
|
|
||||||
_guideRate = value;
|
// _guideRate = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public double GuideRateDeclination
|
public double GuideRateDeclination
|
||||||
|
|||||||
Reference in New Issue
Block a user