Maybe this is what's missing to get the telescope to park

This commit is contained in:
2022-05-07 19:37:16 +01:00
parent 8eb093c13a
commit 64e42f961c
2 changed files with 15 additions and 22 deletions
@@ -2715,15 +2715,15 @@ namespace Meade.net.Telescope.UnitTests
Assert.That(_telescope.Tracking, Is.True); Assert.That(_telescope.Tracking, Is.True);
} }
[TestCase(true)] //[TestCase(true)]
[TestCase(false)] //[TestCase(false)]
public void Tracking_Set_WhenCanSetTrackingIsFalse_ThenThrowsNotImplementedException(bool tracking) //public void Tracking_Set_WhenCanSetTrackingIsFalse_ThenThrowsNotImplementedException(bool tracking)
{ //{
// GW is not supported, so CanSetTracking is false // // GW is not supported, so CanSetTracking is false
ConnectTelescope(firmwareVersion: TelescopeList.Autostar497_30Ee); // ConnectTelescope(firmwareVersion: TelescopeList.Autostar497_30Ee);
Assert.Throws<ASCOM.NotImplementedException>( () => { _telescope.Tracking = tracking; } ); // Assert.Throws<ASCOM.NotImplementedException>( () => { _telescope.Tracking = tracking; } );
} //}
[TestCase(true, "AP")] [TestCase(true, "AP")]
[TestCase(false, "AL")] [TestCase(false, "AL")]
+7 -14
View File
@@ -1782,17 +1782,10 @@ namespace ASCOM.Meade.net
else else
{ {
LogMessage("Park", $"Parking LX200 Classic"); LogMessage("Park", $"Parking LX200 Classic");
//LogMessage("Park", $"Setting Telescope to land targets.");
//try
//{
// SharedResourcesWrapper.SendBlind("AL"); //todo need to route this to the real commands.
// _utilities.WaitForMilliseconds(1000); //Need to wait 1 second according to old driver.
//}
//catch (Exception ex)
//{
// LogMessage("Park", $"AL command failed: {ex.Message}");
//}
Tracking = false;
LogMessage("Park", $"Calculating Park Altitude");
var parkAlt = AlignmentMode == AlignmentModes.algAltAz ? 0 : 90 - SiteLatitude; var parkAlt = AlignmentMode == AlignmentModes.algAltAz ? 0 : 90 - SiteLatitude;
LogMessage("Park", $"Slewing to park position az:0 alt:{parkAlt}"); LogMessage("Park", $"Slewing to park position az:0 alt:{parkAlt}");
SlewToAltAz(0, parkAlt, false); SlewToAltAz(0, parkAlt, false);
@@ -2812,10 +2805,10 @@ namespace ASCOM.Meade.net
} }
set set
{ {
if (!CanSetTracking) //if (!CanSetTracking)
{ //{
throw new ASCOM.NotImplementedException("Tracking Set"); // throw new ASCOM.NotImplementedException("Tracking Set");
} //}
LogMessage("Tracking Set", $"{value}"); LogMessage("Tracking Set", $"{value}");
SharedResourcesWrapper.SendBlind(value ? "AP" : "AL"); //todo need to route this to the real commands. SharedResourcesWrapper.SendBlind(value ? "AP" : "AL"); //todo need to route this to the real commands.