Fixed problem with Autostar not returning the correct value for IsSlewing
This commit is contained in:
@@ -2410,6 +2410,7 @@ namespace Meade.net.Telescope.UnitTests
|
||||
[TestCase(TelescopeList.LX200CLASSIC, "", "[FF][FF][FF][FF][FF][FF][FF][FF][FF][FF][FF][FF][FF][FF] [FF][FF][FF][FF][FF][FF]", false)] //The test case below is this same string encoded to return exactly what the telescope will return.
|
||||
[TestCase(TelescopeList.LX200CLASSIC, "", "\x00ff\x00ff\x00ff\x00ff\x00ff\x00ff\x00ff\x00ff\x00ff\x00ff\x00ff\x00ff\x00ff\x00ff \x00ff\x00ff\x00ff\x00ff\x00ff\x00ff", false)]
|
||||
[TestCase(TelescopeList.Autostar497, TelescopeList.Autostar497_43Eg, "|", true)]
|
||||
[TestCase(TelescopeList.Autostar497, TelescopeList.Autostar497_43Eg, "\u007f", true)]
|
||||
[TestCase(TelescopeList.Autostar497, TelescopeList.Autostar497_43Eg, "", false)]
|
||||
public void Slewing_WhenTelescopeNotSlewing_ThenReturnsFalse(string productName, string firmwareVersion, string response, bool isSlewing)
|
||||
{
|
||||
|
||||
@@ -483,7 +483,7 @@ namespace ASCOM.Meade.net
|
||||
else if (SharedResourcesWrapper.ProductName == TelescopeList.Autostar497)
|
||||
{
|
||||
var displayText = Action("Handbox", "readdisplay");
|
||||
if (displayText.Contains("€Press 0 to Alignor MODE for Menu"))
|
||||
if (displayText.Contains("Press 0 to Alignor MODE for Menu"))
|
||||
{
|
||||
for (var i = 0; i < 4; i++)
|
||||
{
|
||||
@@ -2107,6 +2107,12 @@ namespace ASCOM.Meade.net
|
||||
return isSlewing;
|
||||
}
|
||||
|
||||
if (result.Contains("\u007f"))
|
||||
{
|
||||
isSlewing = true;
|
||||
return isSlewing;
|
||||
}
|
||||
|
||||
////classic LX200 return bar with 32 chars. FF is contained from left to right when slewing
|
||||
//byte[] ba = Encoding.Default.GetBytes(result);
|
||||
////replace fill chars not belonging to a slew bar. Are there others? The bar character is a FF in hex.
|
||||
|
||||
Reference in New Issue
Block a user