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