Code inspections
This commit is contained in:
@@ -6,7 +6,6 @@ using ASCOM.Meade.net.Wrapper;
|
||||
using ASCOM.Utilities.Interfaces;
|
||||
using Moq;
|
||||
using NUnit.Framework;
|
||||
using NotImplementedException = System.NotImplementedException;
|
||||
|
||||
namespace Meade.net.Focuser.UnitTests
|
||||
{
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
|
||||
@@ -85,12 +85,12 @@ namespace ASCOM.Meade.net
|
||||
// TODO Initialize this array with any Primary axis rates that your driver may provide
|
||||
// Example: m_Rates = new Rate[] { new Rate(10.5, 30.2), new Rate(54.0, 43.6) }
|
||||
//this.rates = new Rate[0];
|
||||
_rates = new Rate[] { new Rate(1, 1), new Rate(2, 2), new Rate(3, 3), new Rate(4, 4) };
|
||||
_rates = new[] { new Rate(1, 1), new Rate(2, 2), new Rate(3, 3), new Rate(4, 4) };
|
||||
break;
|
||||
case TelescopeAxes.axisSecondary:
|
||||
// TODO Initialize this array with any Secondary axis rates that your driver may provide
|
||||
//this.rates = new Rate[0];
|
||||
_rates = new Rate[] { new Rate(1, 1), new Rate(2, 2), new Rate(3, 3), new Rate(4, 4) };
|
||||
_rates = new[] { new Rate(1, 1), new Rate(2, 2), new Rate(3, 3), new Rate(4, 4) };
|
||||
break;
|
||||
case TelescopeAxes.axisTertiary:
|
||||
// TODO Initialize this array with any Tertiary axis rates that your driver may provide
|
||||
|
||||
@@ -384,7 +384,7 @@ namespace ASCOM.Meade.net
|
||||
|
||||
if (connectionInfo.SameDevice == 1)
|
||||
{
|
||||
LogMessage("Connected Set", $"Making first connection telescope adjustments");
|
||||
LogMessage("Connected Set", "Making first connection telescope adjustments");
|
||||
//These settings are applied only when the first device connects to the telescope.
|
||||
SetLongFormat(true);
|
||||
|
||||
@@ -426,14 +426,14 @@ namespace ASCOM.Meade.net
|
||||
{
|
||||
case "high":
|
||||
TelescopePointingPrecision(true);
|
||||
LogMessage(propertyName, $"High precision slewing selected");
|
||||
LogMessage(propertyName, "High precision slewing selected");
|
||||
break;
|
||||
case "low":
|
||||
TelescopePointingPrecision(false);
|
||||
LogMessage(propertyName, $"Low precision slewing selected");
|
||||
LogMessage(propertyName, "Low precision slewing selected");
|
||||
break;
|
||||
default:
|
||||
LogMessage(propertyName, $"Precision slewing unchanged");
|
||||
LogMessage(propertyName, "Precision slewing unchanged");
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -494,7 +494,7 @@ namespace ASCOM.Meade.net
|
||||
|
||||
private bool TogglePrecision()
|
||||
{
|
||||
LogMessage("TogglePrecision", $"Toggling slewing precision");
|
||||
LogMessage("TogglePrecision", "Toggling slewing precision");
|
||||
var result = _sharedResourcesWrapper.SendChar(":P#");
|
||||
//:P# Toggles High Precsion Pointing. When High precision pointing is enabled scope will first allow the operator to center a nearby bright star before moving to the actual target.
|
||||
//Returns: <string>
|
||||
@@ -1369,7 +1369,7 @@ namespace ASCOM.Meade.net
|
||||
|
||||
if (_userNewerPulseGuiding && duration < 10000)
|
||||
{
|
||||
LogMessage("PulseGuide", $"Using new pulse guiding technique");
|
||||
LogMessage("PulseGuide", "Using new pulse guiding technique");
|
||||
_sharedResourcesWrapper.SendBlind($":Mg{d}{duration:0000}#");
|
||||
//:MgnDDDD#
|
||||
//:MgsDDDD#
|
||||
@@ -1383,7 +1383,7 @@ namespace ASCOM.Meade.net
|
||||
}
|
||||
else
|
||||
{
|
||||
LogMessage("PulseGuide", $"Using old pulse guiding technique");
|
||||
LogMessage("PulseGuide", "Using old pulse guiding technique");
|
||||
_sharedResourcesWrapper.Lock(() =>
|
||||
{
|
||||
_sharedResourcesWrapper.SendBlind(":RG#"); //Make sure we are at guide rate
|
||||
@@ -2026,7 +2026,7 @@ namespace ASCOM.Meade.net
|
||||
}
|
||||
set
|
||||
{
|
||||
LogMessage($"Tracking Set", $"{value}");
|
||||
LogMessage("Tracking Set", $"{value}");
|
||||
_tracking = value;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -254,7 +254,6 @@ namespace ASCOM.Meade.net
|
||||
{
|
||||
// Probably an attempt to load a Win32 DLL (i.e. not a .net assembly)
|
||||
// Just swallow the exception and continue to the next item.
|
||||
continue;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@@ -262,7 +261,6 @@ namespace ASCOM.Meade.net
|
||||
DriverName, MessageBoxButtons.OK, MessageBoxIcon.Stop);
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -303,7 +301,6 @@ namespace ASCOM.Meade.net
|
||||
{
|
||||
MessageBox.Show(ex.ToString(), DriverName, MessageBoxButtons.OK, MessageBoxIcon.Stop);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
@@ -412,7 +409,7 @@ namespace ASCOM.Meade.net
|
||||
//
|
||||
// ASCOM
|
||||
//
|
||||
assy = type.Assembly;
|
||||
//assy = type.Assembly;
|
||||
|
||||
// Pull the display name from the ServedClassName attribute.
|
||||
attr = Attribute.GetCustomAttribute(type, typeof(ServedClassNameAttribute)); //PWGS Changed to search type for attribute rather than assembly
|
||||
@@ -425,7 +422,7 @@ namespace ASCOM.Meade.net
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show("Error while registering the server:\n" + ex.ToString(),
|
||||
MessageBox.Show($"Error while registering the server:\n{ex}",
|
||||
DriverName, MessageBoxButtons.OK, MessageBoxIcon.Stop);
|
||||
bFail = true;
|
||||
}
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using ASCOM.Utilities;
|
||||
|
||||
namespace ASCOM.Meade.net
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net.NetworkInformation;
|
||||
using System.Text;
|
||||
|
||||
namespace ASCOM.Meade.net
|
||||
namespace ASCOM.Meade.net
|
||||
{
|
||||
public static class TelescopeList
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user