Adding support for Audiostar to be returned as a Synonym of Autostar for GW detection.

This commit is contained in:
2022-09-25 17:04:24 +01:00
parent fa7106a1b4
commit e851fd0e01
3 changed files with 11 additions and 6 deletions
@@ -1118,15 +1118,17 @@ namespace Meade.net.Telescope.UnitTests
Assert.That(result, Is.False); Assert.That(result, Is.False);
} }
[TestCase(TelescopeList.Autostar497_30Ee, false)] [TestCase(TelescopeList.Autostar497, TelescopeList.Autostar497_30Ee, false)]
[TestCase(TelescopeList.Autostar497_43Eg, true)] [TestCase(TelescopeList.Autostar497, TelescopeList.Autostar497_43Eg, true)]
public void CanSetTracking_Get_ReturnsTrueIffGWCommandIsSupported(string firmware, bool supported) [TestCase(TelescopeList.Audiostar, TelescopeList.AudioStar_A4S4, true)]
[TestCase(TelescopeList.Audiostar, TelescopeList.AudioStar_A4S4, true)]
public void CanSetTracking_Get_ReturnsTrueIffGWCommandIsSupported(string product, string firmware, bool expectedSupported)
{ {
ConnectTelescope(firmwareVersion: firmware); ConnectTelescope(product,firmware);
var result = _telescope.CanSetTracking; var result = _telescope.CanSetTracking;
Assert.That(result, Is.EqualTo(supported)); Assert.That(result, Is.EqualTo(expectedSupported));
} }
[Test] [Test]
+1 -1
View File
@@ -1,5 +1,4 @@
#define Telescope #define Telescope
using System; using System;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
@@ -769,6 +768,7 @@ namespace ASCOM.Meade.net
{ {
case TelescopeList.LX200CLASSIC: case TelescopeList.LX200CLASSIC:
return false; return false;
case TelescopeList.Audiostar:
case TelescopeList.Autostar497: case TelescopeList.Autostar497:
return FirmwareIsGreaterThan(TelescopeList.Autostar497_43Eg); return FirmwareIsGreaterThan(TelescopeList.Autostar497_43Eg);
case TelescopeList.LX200GPS: case TelescopeList.LX200GPS:
+3
View File
@@ -4,6 +4,7 @@
{ {
#region Autostar 497/Audiostar #region Autostar 497/Audiostar
public const string Audiostar = "Audiostar"; //This is a synonym for Autostar which can be returned by some of the Audiostar firmware revisions A1f7
public const string Autostar497 = "Autostar"; public const string Autostar497 = "Autostar";
//Autostar/Audiostar firmware revisions //Autostar/Audiostar firmware revisions
@@ -14,6 +15,8 @@
// ReSharper disable once InconsistentNaming // ReSharper disable once InconsistentNaming
public const string Autostar497_43Eg = "43Eg"; public const string Autostar497_43Eg = "43Eg";
// ReSharper disable once InconsistentNaming
public const string AudioStar_A1F7 = "A1F7";
// ReSharper disable once InconsistentNaming // ReSharper disable once InconsistentNaming
public const string AudioStar_A4S4 = "A4S4"; public const string AudioStar_A4S4 = "A4S4";
#endregion #endregion