From d6cec4d63e297b55984d18b24c0bbb968960e28f Mon Sep 17 00:00:00 2001 From: Colin Date: Wed, 3 Jun 2020 00:10:27 +0100 Subject: [PATCH] Checked and removed completed todo tasks --- .../TelescopeUnitTests.cs | 1 - .../Properties/AssemblyInfo.cs | 2 - Meade.net.Telescope/Rates.cs | 6 +- Meade.net.Telescope/Telescope.cs | 68 ++----------------- Meade.net.focuser/Focuser.cs | 8 +-- Meade.net.focuser/Properties/AssemblyInfo.cs | 2 - Meade.net/LocalServer.cs | 4 +- Meade.net/SharedResources.cs | 1 + 8 files changed, 12 insertions(+), 80 deletions(-) diff --git a/Meade.net.Telescope.UnitTests/TelescopeUnitTests.cs b/Meade.net.Telescope.UnitTests/TelescopeUnitTests.cs index e2e7796..b775951 100644 --- a/Meade.net.Telescope.UnitTests/TelescopeUnitTests.cs +++ b/Meade.net.Telescope.UnitTests/TelescopeUnitTests.cs @@ -1680,7 +1680,6 @@ namespace Meade.net.Telescope.UnitTests } - //todo figure out if this is right. don't feel right to me [TestCase("5", 5, -5)] [TestCase("-5", -5, 5)] [TestCase("185", 185, 175)] diff --git a/Meade.net.Telescope/Properties/AssemblyInfo.cs b/Meade.net.Telescope/Properties/AssemblyInfo.cs index 4604c64..ce5b559 100644 --- a/Meade.net.Telescope/Properties/AssemblyInfo.cs +++ b/Meade.net.Telescope/Properties/AssemblyInfo.cs @@ -5,7 +5,6 @@ using System.Runtime.InteropServices; // set of attributes. Change these attribute values to modify the information // associated with an assembly. // -// TODO - Add your authorship information here [assembly: AssemblyTitle("ASCOM.Meade.net.Telescope")] [assembly: AssemblyDescription("ASCOM Telescope driver for Meade.net")] [assembly: AssemblyConfiguration("")] @@ -33,6 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: // -// TODO - Set your driver's version here [assembly: AssemblyVersion("0.0.0.0")] [assembly: AssemblyFileVersion("0.0.0.0")] diff --git a/Meade.net.Telescope/Rates.cs b/Meade.net.Telescope/Rates.cs index c59641a..6022c64 100644 --- a/Meade.net.Telescope/Rates.cs +++ b/Meade.net.Telescope/Rates.cs @@ -33,7 +33,7 @@ namespace ASCOM.Meade.net public void Dispose() { - // TODO Add any required object cleanup here + // Add any required object cleanup here } public double Maximum { get; set; } @@ -106,7 +106,7 @@ namespace ASCOM.Meade.net public void Dispose() { - // TODO Add any required object cleanup here + // Add any required object cleanup here } public IEnumerator GetEnumerator() @@ -176,7 +176,7 @@ namespace ASCOM.Meade.net public void Dispose() { - // TODO Add any required object cleanup here + // Add any required object cleanup here } public DriveRates this[int index] => _trackingRates[index - 1]; diff --git a/Meade.net.Telescope/Telescope.cs b/Meade.net.Telescope/Telescope.cs index 99131c7..4727742 100644 --- a/Meade.net.Telescope/Telescope.cs +++ b/Meade.net.Telescope/Telescope.cs @@ -26,7 +26,7 @@ namespace ASCOM.Meade.net // The ClassInterface/None addribute prevents an empty interface called // _Meade.net from being created and used as the [default] interface // - // TODO Replace the not implemented exceptions with code to implement the function or + // Replace the not implemented exceptions with code to implement the function or // throw the appropriate ASCOM exception. // @@ -840,9 +840,7 @@ namespace ASCOM.Meade.net if (!FirmwareIsGreaterThan(TelescopeList.Autostar497_43Eg)) throw new PropertyNotImplementedException("AlignmentMode",true ); - //todo make this only try with Autostar 43Eg and above. - - switch (value) + switch (value) { case AlignmentModes.algAltAz: _sharedResourcesWrapper.SendBlind("#:AA#"); @@ -1468,7 +1466,7 @@ namespace ASCOM.Meade.net //passed in the command.These commands support serial port driven guiding. //Returns – Nothing //LX200 – Not Supported - _utilities.WaitForMilliseconds(duration); //todo figure out if this is really needed + _utilities.WaitForMilliseconds(duration); } else { @@ -1741,65 +1739,7 @@ namespace ASCOM.Meade.net _utilities.WaitForMilliseconds(200); //be responsive to AbortSlew(); } } - - //private double TargetAltitude - //{ - // set - // { - // if (value > 90) - // throw new InvalidValueException("Altitude cannot be greater than 90."); - - // if (value < 0) - // throw new InvalidValueException("Altitide cannot be less than 0."); - - // CheckConnected("TargetAltitude Set"); - - // //todo this serial string does not work. Calculate the EQ version instead. - - // var dms = _utilities.DegreesToDMS(value, "*", "'", "",0); - // var s = value < 0 ? string.Empty : "+"; - - // var result = _sharedResourcesWrapper.SendChar($"#:Sa{s}{dms}#"); - // //:SasDD*MM# - // //Set target object altitude to sDD*MM# or sDD*MM’SS# [LX 16”, Autostar, Autostar II] - // //Returns: - // //1 Object within slew range - // //0 Object out of slew range - - // if (result == "0") - // throw new InvalidOperationException("Target altitude out of slew range"); - // } - //} - - //private double TargetAzimuth - //{ - // set - // { - // if (value >= 360) - // throw new InvalidValueException("Azimuth cannot be 360 or higher."); - - // if (value < 0) - // throw new InvalidValueException("Azimuth cannot be less than 0."); - - // CheckConnected("TargetAzimuth Set"); - - // //todo this serial string does not work. Calculate the EQ version instead. - - // var dms = _utilitiesExtra.DegreesToDM(value, "*" ); - - // var result = _sharedResourcesWrapper.SendChar($"#:Sz{dms}#"); - // //:SzDDD*MM# - // //Sets the target Object Azimuth[LX 16” and Autostar II only] - // //Returns: - // //0 – Invalid - // //1 - Valid - - // if (result == "0") - // throw new InvalidOperationException("Target Azimuth out of slew range"); - - // } - //} - + public void SlewToAltAzAsync(double azimuth, double altitude) { CheckConnected("SlewToAltAzAsync"); diff --git a/Meade.net.focuser/Focuser.cs b/Meade.net.focuser/Focuser.cs index f00ee64..9cbc786 100644 --- a/Meade.net.focuser/Focuser.cs +++ b/Meade.net.focuser/Focuser.cs @@ -2,7 +2,6 @@ using System; using System.Collections; -using System.Diagnostics; using System.Reflection; using System.Runtime.InteropServices; using ASCOM.DeviceInterface; @@ -19,7 +18,7 @@ namespace ASCOM.Meade.net // The ClassInterface/None addribute prevents an empty interface called // _Meade.net from being created and used as the [default] interface // - // TODO Replace the not implemented exceptions with code to implement the function or + // Replace the not implemented exceptions with code to implement the function or // throw the appropriate ASCOM exception. // @@ -146,7 +145,7 @@ namespace ASCOM.Meade.net { CheckConnected("CommandBool"); //string ret = CommandString(command, raw); - // TODO decode the return string and return true or false + // decode the return string and return true or false // or throw new MethodNotImplementedException("CommandBool"); // DO NOT have both these sections! One or the other @@ -215,7 +214,6 @@ namespace ASCOM.Meade.net public string Description { - // TODO customise this device description get { _tl.LogMessage("Description Get", DriverDescription); @@ -227,7 +225,6 @@ namespace ASCOM.Meade.net { get { - // TODO customise this driver description string driverInfo = $"{Description} .net driver. Version: {DriverVersion}"; LogMessage("DriverInfo Get", driverInfo); return driverInfo; @@ -342,7 +339,6 @@ namespace ASCOM.Meade.net _tl.LogMessage("Move", position.ToString()); CheckConnected("Move"); - //todo implement backlash compensation //todo implement direction reverse //todo implement dynamic braking diff --git a/Meade.net.focuser/Properties/AssemblyInfo.cs b/Meade.net.focuser/Properties/AssemblyInfo.cs index d77e77d..44f749c 100644 --- a/Meade.net.focuser/Properties/AssemblyInfo.cs +++ b/Meade.net.focuser/Properties/AssemblyInfo.cs @@ -5,7 +5,6 @@ using System.Runtime.InteropServices; // set of attributes. Change these attribute values to modify the information // associated with an assembly. // -// TODO - Add your authorship information here [assembly: AssemblyTitle("ASCOM.Meade.net.Focuser")] [assembly: AssemblyDescription("ASCOM Focuser driver for Meade.net")] [assembly: AssemblyConfiguration("")] @@ -33,6 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: // -// TODO - Set your driver's version here [assembly: AssemblyVersion("0.0.0.0")] [assembly: AssemblyFileVersion("0.0.0.0")] diff --git a/Meade.net/LocalServer.cs b/Meade.net/LocalServer.cs index e0916f4..2a719af 100644 --- a/Meade.net/LocalServer.cs +++ b/Meade.net/LocalServer.cs @@ -390,7 +390,7 @@ namespace ASCOM.Meade.net // // Remove all traces of this from the registry. // - // **TODO** If the above does AppID/DCOM stuff, this would have + // If the above does AppID/DCOM stuff, this would have // to remove that stuff too. // private static void UnregisterObjects() @@ -494,7 +494,7 @@ namespace ASCOM.Meade.net bool bRet = true; // - //**TODO** -Embedding is "ActiveX start". Prohibit non_AX starting? + // -Embedding is "ActiveX start". Prohibit non_AX starting? // if (args.Length > 0) { diff --git a/Meade.net/SharedResources.cs b/Meade.net/SharedResources.cs index 887b734..731d491 100644 --- a/Meade.net/SharedResources.cs +++ b/Meade.net/SharedResources.cs @@ -75,6 +75,7 @@ namespace ASCOM.Meade.net set => _profileFactory = value; } + //todo add code to ensure that there is a minimum gap between commands. 5ms as default. public static void SendBlind(string message) { lock (LockObject)