Code inspections
This commit is contained in:
@@ -107,7 +107,7 @@ namespace ASCOM.Meade.net.AstroMaths
|
|||||||
public double RadiansToDegrees(double radians)
|
public double RadiansToDegrees(double radians)
|
||||||
{
|
{
|
||||||
double degrees = (180 / Math.PI) * radians;
|
double degrees = (180 / Math.PI) * radians;
|
||||||
return (degrees);
|
return degrees;
|
||||||
}
|
}
|
||||||
|
|
||||||
//todo convert to extension method
|
//todo convert to extension method
|
||||||
|
|||||||
@@ -466,7 +466,7 @@ namespace ASCOM.Meade.net
|
|||||||
{
|
{
|
||||||
var currentVersion = _sharedResourcesWrapper.FirmwareVersion;
|
var currentVersion = _sharedResourcesWrapper.FirmwareVersion;
|
||||||
var comparison = String.Compare(currentVersion, minVersion, StringComparison.Ordinal);
|
var comparison = String.Compare(currentVersion, minVersion, StringComparison.Ordinal);
|
||||||
return (comparison >= 0);
|
return comparison >= 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetLongFormat(bool setLongFormat)
|
public void SetLongFormat(bool setLongFormat)
|
||||||
|
|||||||
@@ -156,25 +156,25 @@ namespace ASCOM.Meade.net
|
|||||||
Flags,
|
Flags,
|
||||||
out _mCookie
|
out _mCookie
|
||||||
);
|
);
|
||||||
return (i == 0);
|
return i == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool RevokeClassObject()
|
public bool RevokeClassObject()
|
||||||
{
|
{
|
||||||
int i = CoRevokeClassObject(_mCookie);
|
int i = CoRevokeClassObject(_mCookie);
|
||||||
return (i == 0);
|
return i == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool ResumeClassObjects()
|
public static bool ResumeClassObjects()
|
||||||
{
|
{
|
||||||
int i = CoResumeClassObjects();
|
int i = CoResumeClassObjects();
|
||||||
return (i == 0);
|
return i == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool SuspendClassObjects()
|
public static bool SuspendClassObjects()
|
||||||
{
|
{
|
||||||
int i = CoSuspendClassObjects();
|
int i = CoSuspendClassObjects();
|
||||||
return (i == 0);
|
return i == 0;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ namespace ASCOM.Meade.net
|
|||||||
double newGuideRate = double.Parse(txtGuideRate.Text.Trim());
|
double newGuideRate = double.Parse(txtGuideRate.Text.Trim());
|
||||||
|
|
||||||
const double siderealArcSecondsPerSecond = 15.041;
|
const double siderealArcSecondsPerSecond = 15.041;
|
||||||
var percentOfSideReal = (newGuideRate / siderealArcSecondsPerSecond * 100);
|
var percentOfSideReal = newGuideRate / siderealArcSecondsPerSecond * 100;
|
||||||
|
|
||||||
lblPercentOfSiderealRate.Text = $"({percentOfSideReal:00.0}% of sidereal rate)";
|
lblPercentOfSiderealRate.Text = $"({percentOfSideReal:00.0}% of sidereal rate)";
|
||||||
_guideRateValid = true;
|
_guideRateValid = true;
|
||||||
|
|||||||
@@ -353,7 +353,7 @@ namespace ASCOM.Meade.net
|
|||||||
public static bool IsConnected(string deviceId)
|
public static bool IsConnected(string deviceId)
|
||||||
{
|
{
|
||||||
if (ConnectedDevices.ContainsKey(deviceId))
|
if (ConnectedDevices.ContainsKey(deviceId))
|
||||||
return (ConnectedDevices[deviceId].Count > 0);
|
return ConnectedDevices[deviceId].Count > 0;
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user