Added unit test to make sure that the LX200GPS with german firmware works as expected.
This commit is contained in:
@@ -791,12 +791,12 @@ namespace Meade.net.Telescope.UnitTests
|
||||
Assert.That(exception.Message, Is.EqualTo("Not connected to telescope when trying to execute: AlignmentMode Get"));
|
||||
}
|
||||
|
||||
|
||||
[TestCase("A", AlignmentModes.algAltAz, TelescopeList.Autostar497, TelescopeList.Autostar497_31Ee)]
|
||||
[TestCase("P", AlignmentModes.algPolar, TelescopeList.Autostar497, TelescopeList.Autostar497_31Ee)]
|
||||
[TestCase("A", AlignmentModes.algAltAz, TelescopeList.Autostar497, TelescopeList.Autostar497_43Eg)]
|
||||
[TestCase("P", AlignmentModes.algPolar, TelescopeList.Autostar497, TelescopeList.Autostar497_43Eg)]
|
||||
[TestCase("G", AlignmentModes.algGermanPolar, TelescopeList.Autostar497, TelescopeList.Autostar497_43Eg)]
|
||||
[TestCase("P", AlignmentModes.algPolar, TelescopeList.LX200GPS, TelescopeList.LX200GPS_4G0M)]
|
||||
public void AlignmentMode_Get_WhenScopeInAltAz_ReturnsAltAz(string telescopeMode, AlignmentModes alignmentMode, string productName, string firmware)
|
||||
{
|
||||
_testProperties.AlignmentMode = telescopeMode;
|
||||
|
||||
@@ -1102,7 +1102,7 @@ namespace ASCOM.Meade.net
|
||||
LogMessage("AlignmentMode Get", $"Sending Ack code.");
|
||||
var alignmentString = GetAlignmentString();
|
||||
AlignmentModes alignmentMode;
|
||||
switch (alignmentString)
|
||||
switch (alignmentString.ToUpperInvariant())
|
||||
{
|
||||
case "A":
|
||||
LogMessage("AlignmentMode Get", $"Telescope is in AltAz");
|
||||
@@ -1116,9 +1116,10 @@ namespace ASCOM.Meade.net
|
||||
LogMessage("AlignmentMode Get", $"Telescope is in Land mode");
|
||||
alignmentMode = AlignmentModes.algAltAz;
|
||||
break;
|
||||
//case "G":
|
||||
//alignmentMode = AlignmentModes.algGermanPolar;
|
||||
//break;
|
||||
case "G":
|
||||
LogMessage("AlignmentMode Get", $"Telescope is in German Polar mode");
|
||||
alignmentMode = AlignmentModes.algGermanPolar;
|
||||
break;
|
||||
default:
|
||||
var msg = $"unknown alignment returned from telescope: {alignmentString}";
|
||||
LogMessage("AlignmentMode Get", msg);
|
||||
|
||||
Reference in New Issue
Block a user