Merge branch 'develop' into feature/GWSupport
This commit is contained in:
@@ -90,6 +90,10 @@
|
||||
<Project>{64308775-bd4a-469c-bcab-3ed830b811af}</Project>
|
||||
<Name>Meade.net.Telescope</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Meade.net\Meade.net.csproj">
|
||||
<Project>{3689a2cb-94c5-4012-a5cf-7e7d1dd27143}</Project>
|
||||
<Name>Meade.net</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
|
||||
@@ -27,6 +27,12 @@ namespace Meade.net.Focuser.UnitTests
|
||||
{
|
||||
TraceLogger = false,
|
||||
ComPort = "TestCom1",
|
||||
Speed = 9600,
|
||||
Parity = "None",
|
||||
Handshake = "None",
|
||||
StopBits = "One",
|
||||
DataBits = 8,
|
||||
|
||||
GuideRateArcSecondsPerSecond = 1.23,
|
||||
Precision = "Unchanged",
|
||||
GuidingStyle = "Auto"
|
||||
@@ -153,11 +159,11 @@ namespace Meade.net.Focuser.UnitTests
|
||||
|
||||
ConnectFocuser();
|
||||
|
||||
_sharedResourcesWrapperMock.Setup(x => x.SendString(sendMessage)).Returns(() => expectedMessage);
|
||||
_sharedResourcesWrapperMock.Setup(x => x.SendString(sendMessage, true)).Returns(() => expectedMessage);
|
||||
|
||||
var actualMessage = _focuser.CommandString(sendMessage, true);
|
||||
|
||||
_sharedResourcesWrapperMock.Verify(x => x.SendString(sendMessage), Times.Once);
|
||||
_sharedResourcesWrapperMock.Verify(x => x.SendString(sendMessage, true), Times.Once);
|
||||
Assert.That(actualMessage, Is.EqualTo(expectedMessage));
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -124,7 +124,6 @@
|
||||
<Compile Include="AstroMaths\AstroMathExtensions.cs" />
|
||||
<Compile Include="AstroMaths\AstroMaths.cs" />
|
||||
<Compile Include="AstroMaths\EquatorialCoordinates.cs" />
|
||||
<Compile Include="AstroMaths\HorizonCoordinates.cs" />
|
||||
<Compile Include="AstroMaths\IAstroMaths.cs" />
|
||||
<Compile Include="Clock.cs" />
|
||||
<Compile Include="ComparisonResult.cs" />
|
||||
|
||||
@@ -357,7 +357,7 @@ namespace ASCOM.Meade.net
|
||||
// it's a good idea to put all the low level communication with the device here,
|
||||
// then all communication calls this function
|
||||
// you need something to ensure that only one command is in progress at a time
|
||||
return SharedResourcesWrapper.SendString(command);
|
||||
return SharedResourcesWrapper.SendString(command, raw);
|
||||
//throw new ASCOM.MethodNotImplementedException("CommandString");
|
||||
}
|
||||
|
||||
@@ -409,6 +409,9 @@ namespace ASCOM.Meade.net
|
||||
{
|
||||
LogMessage("Connected Set", "Making first connection telescope adjustments");
|
||||
|
||||
LogMessage("Connected Set", $"Site Longitude: {SiteLongitude}");
|
||||
LogMessage("Connected Set", $"Site Latitude: {SiteLatitude}");
|
||||
|
||||
//These settings are applied only when the first device connects to the telescope.
|
||||
SetLongFormat(true);
|
||||
|
||||
@@ -418,6 +421,36 @@ namespace ASCOM.Meade.net
|
||||
}
|
||||
|
||||
SetTelescopePrecision("Connect");
|
||||
|
||||
LogMessage("Connected Set", $"SendDateTime: {SendDateTime}");
|
||||
if (SendDateTime)
|
||||
{
|
||||
if (SharedResourcesWrapper.ProductName == TelescopeList.LX200GPS)
|
||||
{
|
||||
LogMessage("Connected Set", $"LX200GPS Detecting if daylight savings message on screen: {SendDateTime}");
|
||||
var displayText = Action("Handbox", "readdisplay");
|
||||
LogMessage("Connected Set", $"Current Handset display: {displayText}");
|
||||
if (displayText.Contains("Daylight"))
|
||||
{
|
||||
LogMessage("Connected Set", $"LX200GPS Setting Date time and bypassing settings screens: {SendDateTime}");
|
||||
BypassHandboxEntryForAutostarII();
|
||||
}
|
||||
else
|
||||
{
|
||||
LogMessage("Connected Set", $"LX200GPS Sending current date and time: {SendDateTime}");
|
||||
SendCurrentDateTime("Connect");
|
||||
LogMessage("Connected Set", $"LX200GPS Attempting manual bypass of prompts: {SendDateTime}");
|
||||
ApplySkipAutoStarPrompts("Connect");
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
LogMessage("Connected Set", "Autostar Attempting manual bypass of prompts");
|
||||
ApplySkipAutoStarPrompts("Connect");
|
||||
SendCurrentDateTime("Connect");
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -447,6 +480,48 @@ namespace ASCOM.Meade.net
|
||||
}
|
||||
}
|
||||
|
||||
private void SendCurrentDateTime(string connect)
|
||||
{
|
||||
if (SendDateTime)
|
||||
{
|
||||
UTCDate = _clock.UtcNow;
|
||||
}
|
||||
}
|
||||
|
||||
private void ApplySkipAutoStarPrompts(string connect)
|
||||
{
|
||||
if (SharedResourcesWrapper.ProductName == TelescopeList.LX200GPS)
|
||||
{
|
||||
var displayText = Action("Handbox", "readdisplay");
|
||||
|
||||
if (displayText.Contains("Daylight"))
|
||||
{
|
||||
for (var i = 0; i < 3; i++)
|
||||
{
|
||||
Action("Handbox", "enter");
|
||||
_utilities.WaitForMilliseconds(2000);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (SharedResourcesWrapper.ProductName == TelescopeList.Autostar497)
|
||||
{
|
||||
var i = 10;
|
||||
while (i > 0)
|
||||
{
|
||||
var displayText = Action("Handbox", "readdisplay");
|
||||
if (displayText.Contains("Align:"))
|
||||
{
|
||||
i = 0;
|
||||
continue;
|
||||
}
|
||||
|
||||
Action("Handbox", "mode");
|
||||
_utilities.WaitForMilliseconds(500);
|
||||
i--;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void SetTelescopePrecision(string propertyName)
|
||||
{
|
||||
switch (Precision.ToLower())
|
||||
@@ -558,7 +633,7 @@ namespace ASCOM.Meade.net
|
||||
if((Math.Abs(RightAscension - rightTargetAscension ) <= eps) &&
|
||||
(Math.Abs(Declination - targetDeclination) <= eps))
|
||||
{
|
||||
LogMessage("IsTargetCoordinateInitRequired", $"0 diff -> false");
|
||||
LogMessage("IsTargetCoordinateInitRequired", "0 diff -> false");
|
||||
_isTargetCoordinateInitRequired = false;
|
||||
return _isTargetCoordinateInitRequired;
|
||||
}
|
||||
@@ -582,7 +657,7 @@ namespace ASCOM.Meade.net
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogMessage("InitTargetCoordinates", $"Error sync telescope position", ex.Message);
|
||||
LogMessage("InitTargetCoordinates", "Error sync telescope position", ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -811,6 +886,7 @@ namespace ASCOM.Meade.net
|
||||
public void AbortSlew()
|
||||
{
|
||||
CheckConnected("AbortSlew");
|
||||
CheckParked();
|
||||
|
||||
LogMessage("AbortSlew", "Aborting slew");
|
||||
SharedResourcesWrapper.SendBlind(":Q#");
|
||||
@@ -822,6 +898,12 @@ namespace ASCOM.Meade.net
|
||||
SetSlewingMinEndTime();
|
||||
}
|
||||
|
||||
private void CheckParked()
|
||||
{
|
||||
if (AtPark)
|
||||
throw new ParkedException("Telescope is parked");
|
||||
}
|
||||
|
||||
public AlignmentModes AlignmentMode
|
||||
{
|
||||
get
|
||||
@@ -1212,17 +1294,24 @@ namespace ASCOM.Meade.net
|
||||
{
|
||||
get
|
||||
{
|
||||
CheckConnected("CanUnpark");
|
||||
|
||||
//todo make this return false for non LX-200 GPS telescopes
|
||||
LogMessage("CanUnpark", "Get - " + true);
|
||||
return true;
|
||||
return SharedResourcesWrapper.ProductName == TelescopeList.LX200GPS;
|
||||
}
|
||||
}
|
||||
|
||||
private double _lastGoodDeclination;
|
||||
|
||||
public double Declination
|
||||
{
|
||||
get
|
||||
{
|
||||
CheckConnected("Declination Get");
|
||||
try
|
||||
{
|
||||
CheckParked();
|
||||
|
||||
var result = SharedResourcesWrapper.SendString(":GD#");
|
||||
//:GD# Get Telescope Declination.
|
||||
@@ -1232,8 +1321,23 @@ namespace ASCOM.Meade.net
|
||||
double declination = _utilities.DMSToDegrees(result);
|
||||
|
||||
LogMessage("Declination", $"Get - {result} convert to {declination} {_utilitiesExtra.DegreesToDMS(declination, ":", ":")}");
|
||||
_lastGoodDeclination = declination;
|
||||
return declination;
|
||||
}
|
||||
catch (ParkedException)
|
||||
{
|
||||
switch (ParkedBehaviour)
|
||||
{
|
||||
case ParkedBehaviour.LastGoodPosition:
|
||||
return _lastGoodDeclination;
|
||||
case ParkedBehaviour.ReportCoordinates:
|
||||
var raDec = _astroMaths.ConvertHozToEq(UTCDate, SiteLatitude, SiteLongitude, ParkedAltAz);
|
||||
return raDec.Declination;
|
||||
default:
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public double DeclinationRate
|
||||
@@ -1384,6 +1488,7 @@ namespace ASCOM.Meade.net
|
||||
{
|
||||
LogMessage("MoveAxis", $"Axis={axis} rate={rate}");
|
||||
CheckConnected("MoveAxis");
|
||||
CheckParked();
|
||||
|
||||
var absRate = Math.Abs(rate);
|
||||
|
||||
@@ -1492,10 +1597,11 @@ namespace ASCOM.Meade.net
|
||||
if (AtPark)
|
||||
return;
|
||||
|
||||
//Setting park to true before sending the park command as the Autostar and Audiostar stop serial communications once the park command has been issued.
|
||||
AtPark = true;
|
||||
SharedResourcesWrapper.SendBlind(":hP#");
|
||||
//:hP# Autostar, Autostar II and LX 16”Slew to Park Position
|
||||
//Returns: Nothing
|
||||
AtPark = true;
|
||||
}
|
||||
|
||||
private bool _userNewerPulseGuiding = true;
|
||||
@@ -1506,6 +1612,7 @@ namespace ASCOM.Meade.net
|
||||
try
|
||||
{
|
||||
CheckConnected("PulseGuide");
|
||||
CheckParked();
|
||||
if (IsSlewingToTarget())
|
||||
throw new InvalidOperationException("Unable to PulseGuide whilst slewing to target.");
|
||||
|
||||
@@ -1616,11 +1723,17 @@ namespace ASCOM.Meade.net
|
||||
return _utilities.HMSToHours(hms);
|
||||
}
|
||||
|
||||
double _lastGoodRightAsension;
|
||||
|
||||
public double RightAscension
|
||||
{
|
||||
get
|
||||
{
|
||||
CheckConnected("RightAscension Get");
|
||||
try
|
||||
{
|
||||
CheckParked();
|
||||
|
||||
var result = SharedResourcesWrapper.SendString(":GR#");
|
||||
//:GR# Get Telescope RA
|
||||
//Returns: HH:MM.T# or HH:MM:SS#
|
||||
@@ -1629,8 +1742,24 @@ namespace ASCOM.Meade.net
|
||||
double rightAscension = HmToHours(result);
|
||||
|
||||
LogMessage("RightAscension", $"Get - {result} convert to {rightAscension} {_utilitiesExtra.HoursToHMS(rightAscension)}");
|
||||
_lastGoodRightAsension = rightAscension;
|
||||
return rightAscension;
|
||||
}
|
||||
catch (ParkedException)
|
||||
{
|
||||
switch (ParkedBehaviour)
|
||||
{
|
||||
case ParkedBehaviour.LastGoodPosition:
|
||||
return _lastGoodRightAsension;
|
||||
case ParkedBehaviour.ReportCoordinates:
|
||||
var raDec = _astroMaths.ConvertHozToEq(UTCDate, SiteLatitude, SiteLongitude, ParkedAltAz);
|
||||
return raDec.RightAscension;
|
||||
default:
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public double RightAscensionRate
|
||||
@@ -1687,7 +1816,7 @@ namespace ASCOM.Meade.net
|
||||
double siderealTime = 0.0;
|
||||
using (var novas = new NOVAS31())
|
||||
{
|
||||
var jd = _utilities.DateUTCToJulian(DateTime.UtcNow);
|
||||
var jd = _utilities.DateUTCToJulian(_clock.UtcNow);
|
||||
novas.SiderealTime(jd, 0, novas.DeltaT(jd),
|
||||
GstType.GreenwichApparentSiderealTime,
|
||||
Method.EquinoxBased,
|
||||
@@ -1722,31 +1851,50 @@ namespace ASCOM.Meade.net
|
||||
LogMessage("SiteElevation", $"Set: {value}");
|
||||
if (Math.Abs(value - base.SiteElevation) < 0.1)
|
||||
{
|
||||
LogMessage("SiteElevation", $"Set: no change detected");
|
||||
LogMessage("SiteElevation", "Set: no change detected");
|
||||
return;
|
||||
}
|
||||
|
||||
LogMessage("SiteElevation", $"Set: {value} was {base.SiteElevation}");
|
||||
base.SiteElevation = value;
|
||||
base.UpdateSiteElevation();
|
||||
UpdateSiteElevation();
|
||||
}
|
||||
}
|
||||
|
||||
private double? _lastGoodSiteLatitude;
|
||||
public double SiteLatitude
|
||||
{
|
||||
get
|
||||
{
|
||||
CheckConnected("SiteLatitude Get");
|
||||
try
|
||||
{
|
||||
CheckParked();
|
||||
|
||||
var latitude = SharedResourcesWrapper.SendString(":Gt#");
|
||||
//:Gt# Get Current Site Latitude
|
||||
//Returns: sDD* MM#
|
||||
//The latitude of the current site. Positive inplies North latitude.
|
||||
|
||||
if (latitude != null)
|
||||
{
|
||||
var siteLatitude = _utilities.DMSToDegrees(latitude);
|
||||
LogMessage("SiteLatitude Get", $"{_utilitiesExtra.DegreesToDMS(siteLatitude)}");
|
||||
|
||||
_lastGoodSiteLatitude = siteLatitude;
|
||||
return siteLatitude;
|
||||
}
|
||||
|
||||
throw new InvalidOperationException("unable to get site latitude from telescope.");
|
||||
}
|
||||
catch (ParkedException)
|
||||
{
|
||||
if (ParkedBehaviour == ParkedBehaviour.NoCoordinates)
|
||||
throw;
|
||||
|
||||
return _lastGoodSiteLatitude.Value;
|
||||
}
|
||||
}
|
||||
set
|
||||
{
|
||||
LogMessage("SiteLatitude Set", $"{_utilitiesExtra.DegreesToDMS(value)}");
|
||||
@@ -1774,14 +1922,21 @@ namespace ASCOM.Meade.net
|
||||
//1 - Valid
|
||||
if (result != "1")
|
||||
throw new InvalidOperationException("Failed to set site latitude.");
|
||||
|
||||
_lastGoodSiteLatitude = value;
|
||||
}
|
||||
}
|
||||
|
||||
private double _lastGoodSiteLongitude;
|
||||
|
||||
public double SiteLongitude
|
||||
{
|
||||
get
|
||||
{
|
||||
CheckConnected("SiteLongitude Get");
|
||||
try
|
||||
{
|
||||
CheckParked();
|
||||
|
||||
var longitude = SharedResourcesWrapper.SendString(":Gg#");
|
||||
//:Gg# Get Current Site Longitude
|
||||
@@ -1793,8 +1948,17 @@ namespace ASCOM.Meade.net
|
||||
siteLongitude = siteLongitude + 360;
|
||||
|
||||
LogMessage("SiteLongitude Get", $"{_utilitiesExtra.DegreesToDMS(siteLongitude)}");
|
||||
_lastGoodSiteLongitude = siteLongitude;
|
||||
return siteLongitude;
|
||||
}
|
||||
catch (ParkedException)
|
||||
{
|
||||
if (ParkedBehaviour == ParkedBehaviour.NoCoordinates)
|
||||
throw;
|
||||
|
||||
return _lastGoodSiteLongitude;
|
||||
}
|
||||
}
|
||||
set
|
||||
{
|
||||
var newLongitude = value;
|
||||
@@ -1827,6 +1991,8 @@ namespace ASCOM.Meade.net
|
||||
//1 - Valid
|
||||
if (result != "1")
|
||||
throw new InvalidOperationException("Failed to set site longitude.");
|
||||
|
||||
_lastGoodSiteLongitude = value;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1850,6 +2016,7 @@ namespace ASCOM.Meade.net
|
||||
{
|
||||
LogMessage("SlewToAltAz", $"Az=~{azimuth} Alt={altitude}");
|
||||
CheckConnected("SlewToAltAz");
|
||||
CheckParked();
|
||||
|
||||
SlewToAltAzAsync(azimuth, altitude);
|
||||
|
||||
@@ -1862,6 +2029,7 @@ namespace ASCOM.Meade.net
|
||||
public void SlewToAltAzAsync(double azimuth, double altitude)
|
||||
{
|
||||
CheckConnected("SlewToAltAzAsync");
|
||||
CheckParked();
|
||||
|
||||
if (altitude > 90)
|
||||
throw new InvalidValueException("Altitude cannot be greater than 90.");
|
||||
@@ -1902,6 +2070,7 @@ namespace ASCOM.Meade.net
|
||||
private void DoSlewAsync(bool polar)
|
||||
{
|
||||
CheckConnected("DoSlewAsync");
|
||||
CheckParked();
|
||||
|
||||
SharedResourcesWrapper.Lock(() =>
|
||||
{
|
||||
@@ -1966,6 +2135,7 @@ namespace ASCOM.Meade.net
|
||||
{
|
||||
LogMessage("SlewToCoordinates", $"Ra={rightAscension}, Dec={declination}");
|
||||
CheckConnected("SlewToCoordinates");
|
||||
CheckParked();
|
||||
|
||||
SlewToCoordinatesAsync(rightAscension, declination);
|
||||
|
||||
@@ -1981,6 +2151,7 @@ namespace ASCOM.Meade.net
|
||||
{
|
||||
LogMessage("SlewToCoordinatesAsync", $"Ra={rightAscension}, Dec={declination}");
|
||||
CheckConnected("SlewToCoordinatesAsync");
|
||||
CheckParked();
|
||||
|
||||
SharedResourcesWrapper.Lock(() =>
|
||||
{
|
||||
@@ -1996,6 +2167,7 @@ namespace ASCOM.Meade.net
|
||||
{
|
||||
LogMessage("SlewToTarget", "Executing");
|
||||
CheckConnected("SlewToTarget");
|
||||
CheckParked();
|
||||
SlewToTargetAsync();
|
||||
|
||||
while (Slewing)
|
||||
@@ -2009,6 +2181,7 @@ namespace ASCOM.Meade.net
|
||||
public void SlewToTargetAsync()
|
||||
{
|
||||
CheckConnected("SlewToTargetAsync");
|
||||
CheckParked();
|
||||
|
||||
if (TargetDeclination.Equals(InvalidParameter) || TargetRightAscension.Equals(InvalidParameter))
|
||||
throw new InvalidOperationException("No target selected to slew to.");
|
||||
@@ -2054,13 +2227,18 @@ namespace ASCOM.Meade.net
|
||||
|
||||
private bool GetSlewing()
|
||||
{
|
||||
if (!Connected) return false;
|
||||
var result = false;
|
||||
try
|
||||
{
|
||||
if (Connected)
|
||||
result = MovingAxis() || IsSlewingToTarget();
|
||||
}
|
||||
finally
|
||||
{
|
||||
LogMessage("GetSlewing", $"Result = {result}");
|
||||
}
|
||||
|
||||
|
||||
if (MovingAxis())
|
||||
return true;
|
||||
|
||||
return IsSlewingToTarget();
|
||||
return result;
|
||||
}
|
||||
|
||||
private bool IsSlewingToTarget()
|
||||
@@ -2070,7 +2248,15 @@ namespace ASCOM.Meade.net
|
||||
if (_isGuiding)
|
||||
return false;
|
||||
|
||||
var result = SharedResourcesWrapper.SendString(":D#");
|
||||
string result;
|
||||
try
|
||||
{
|
||||
result = SharedResourcesWrapper.SendString(":D#");
|
||||
}
|
||||
catch (TimeoutException)
|
||||
{
|
||||
result = string.Empty;
|
||||
}
|
||||
//:D# Requests a string of bars indicating the distance to the current target location.
|
||||
//Returns:
|
||||
//LX200's – a string of bar characters indicating the distance.
|
||||
@@ -2092,6 +2278,12 @@ namespace ASCOM.Meade.net
|
||||
return isSlewing;
|
||||
}
|
||||
|
||||
if (result.Contains("\u007f"))
|
||||
{
|
||||
isSlewing = true;
|
||||
return isSlewing;
|
||||
}
|
||||
|
||||
////classic LX200 return bar with 32 chars. FF is contained from left to right when slewing
|
||||
//byte[] ba = Encoding.Default.GetBytes(result);
|
||||
////replace fill chars not belonging to a slew bar. Are there others? The bar character is a FF in hex.
|
||||
@@ -2107,13 +2299,13 @@ namespace ASCOM.Meade.net
|
||||
////a 0 movement will solved that lock if the target coordinates are set to the current coordinates.
|
||||
//if (IsTargetCoordinateInitRequired())
|
||||
// InitTargetCoordinates();
|
||||
|
||||
return isSlewing;
|
||||
}
|
||||
finally
|
||||
{
|
||||
LogMessage("IsSlewingToTarget", $"IsSlewing = {isSlewing} : result = {result ?? "<null>"}");
|
||||
}
|
||||
|
||||
return isSlewing;
|
||||
}
|
||||
|
||||
public void SyncToAltAz(double azimuth, double altitude)
|
||||
@@ -2127,6 +2319,7 @@ namespace ASCOM.Meade.net
|
||||
LogMessage("SyncToCoordinates", $"RA={rightAscension} Dec={declination}");
|
||||
LogMessage("SyncToCoordinates", $"RA={_utilitiesExtra.HoursToHMS(rightAscension)} Dec={_utilitiesExtra.HoursToHMS(declination)}");
|
||||
CheckConnected("SyncToCoordinates");
|
||||
CheckParked();
|
||||
|
||||
SharedResourcesWrapper.Lock(() =>
|
||||
{
|
||||
@@ -2141,6 +2334,7 @@ namespace ASCOM.Meade.net
|
||||
{
|
||||
LogMessage("SyncToTarget", "Executing");
|
||||
CheckConnected("SyncToTarget");
|
||||
CheckParked();
|
||||
|
||||
var result = SharedResourcesWrapper.SendString(":CM#");
|
||||
//:CM# Synchronizes the telescope's position with the currently selected database object's coordinates.
|
||||
@@ -2194,6 +2388,7 @@ namespace ASCOM.Meade.net
|
||||
LogMessage("TargetDeclination Set", $"{value}");
|
||||
|
||||
CheckConnected("TargetDeclination Set");
|
||||
CheckParked();
|
||||
|
||||
if (value > 90)
|
||||
throw new InvalidValueException("Declination cannot be greater than 90.");
|
||||
@@ -2249,6 +2444,7 @@ namespace ASCOM.Meade.net
|
||||
{
|
||||
LogMessage("TargetRightAscension Set", $"{value}");
|
||||
CheckConnected("TargetRightAscension Set");
|
||||
CheckParked();
|
||||
|
||||
if (value < 0)
|
||||
throw new InvalidValueException("Right ascension value cannot be below 0");
|
||||
@@ -2324,6 +2520,7 @@ namespace ASCOM.Meade.net
|
||||
{
|
||||
LogMessage("TrackingRate Set", $"{value}");
|
||||
CheckConnected("TrackingRate Set");
|
||||
CheckParked();
|
||||
|
||||
switch (value)
|
||||
{
|
||||
@@ -2392,8 +2589,10 @@ namespace ASCOM.Meade.net
|
||||
get
|
||||
{
|
||||
CheckConnected("UTCDate Get");
|
||||
|
||||
LogMessage("UTCDate", "Get started");
|
||||
try
|
||||
{
|
||||
CheckParked();
|
||||
|
||||
var telescopeDateDetails = SharedResourcesWrapper.Lock(() =>
|
||||
{
|
||||
@@ -2433,6 +2632,14 @@ namespace ASCOM.Meade.net
|
||||
|
||||
return utcDate;
|
||||
}
|
||||
catch (ParkedException e)
|
||||
{
|
||||
if (ParkedBehaviour == ParkedBehaviour.NoCoordinates)
|
||||
throw;
|
||||
|
||||
return _clock.UtcNow;
|
||||
}
|
||||
}
|
||||
set
|
||||
{
|
||||
LogMessage("UTCDate", "Set - " + value.ToString("MM/dd/yy HH:mm:ss"));
|
||||
@@ -2479,8 +2686,11 @@ namespace ASCOM.Meade.net
|
||||
public void Unpark()
|
||||
{
|
||||
LogMessage("Unpark", "Unparking telescope");
|
||||
CheckConnected("Unpark");
|
||||
|
||||
if (SharedResourcesWrapper.ProductName != TelescopeList.LX200GPS)
|
||||
throw new InvalidOperationException("Unable to unpark this telescope type");
|
||||
|
||||
//todo make this return only work for LX-200 GPS telescopes
|
||||
if (!AtPark)
|
||||
return;
|
||||
|
||||
@@ -2488,18 +2698,24 @@ namespace ASCOM.Meade.net
|
||||
//:I# LX200 GPS Only - Causes the telescope to cease current operations and restart at its power on initialization.
|
||||
//Returns: X once the handset restart has completed
|
||||
|
||||
BypassHandboxEntryForAutostarII();
|
||||
|
||||
AtPark = false;
|
||||
}
|
||||
|
||||
private bool BypassHandboxEntryForAutostarII()
|
||||
{
|
||||
var utcCorrection = GetUtcCorrection();
|
||||
var localDateTime = DateTime.UtcNow - utcCorrection;
|
||||
var localDateTime = _clock.UtcNow - utcCorrection;
|
||||
|
||||
//localDateTime: HH: mm: ss
|
||||
SharedResourcesWrapper.SendBlind($":hI{localDateTime:yyMMddhhmmss}#");
|
||||
var result = SharedResourcesWrapper.SendChar($":hI{localDateTime:yyMMddHHmmss}#");
|
||||
//:hIYYMMDDHHMMSS#
|
||||
//Bypass handbox entry of daylight savings, date and time.Use the values supplied in this command.This feature is
|
||||
//intended to allow use of the Autostar II from permanent installations where GPS reception is not possible, such as within
|
||||
//metal domes. This command must be issued while the telescope is waiting at the initial daylight savings prompt.
|
||||
//Returns: 1 – if command was accepted.
|
||||
|
||||
AtPark = false;
|
||||
return result == "1";
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -2596,13 +2812,18 @@ namespace ASCOM.Meade.net
|
||||
|
||||
private void WriteProfile()
|
||||
{
|
||||
var profileProperties = new ProfileProperties
|
||||
{
|
||||
TraceLogger = Tl.Enabled,
|
||||
ComPort = ComPort,
|
||||
GuideRateArcSecondsPerSecond = GuideRate
|
||||
};
|
||||
var changed = false;
|
||||
|
||||
var profileProperties = SharedResourcesWrapper.ReadProfile();
|
||||
|
||||
|
||||
if (Math.Abs(profileProperties.GuideRateArcSecondsPerSecond - GuideRate) > 0.0000001)
|
||||
{
|
||||
changed = true;
|
||||
profileProperties.GuideRateArcSecondsPerSecond = GuideRate;
|
||||
}
|
||||
|
||||
if (changed)
|
||||
SharedResourcesWrapper.WriteProfile(profileProperties);
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -59,15 +59,16 @@ namespace Meade.net.UnitTests
|
||||
Assert.That(result, Is.EqualTo(expectedResult));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void SendString_WhenCalled_ThenSendsMessageAndReadsResultUntilTerminatorFound()
|
||||
[TestCase(false, "Test")]
|
||||
[TestCase(true, "#Test")]
|
||||
public void SendString_WhenCalled_ThenSendsMessageAndReadsResultUntilTerminatorFound(bool includePrefix, string expectedMessage)
|
||||
{
|
||||
var expectedMessage = "Test";
|
||||
var transmitMessage = "Test";
|
||||
var expectedResult = "TestMessage#";
|
||||
|
||||
_serialMock.Setup(x => x.ReceiveTerminated("#")).Returns(expectedResult);
|
||||
|
||||
var result = SharedResources.SendString(expectedMessage);
|
||||
var result = SharedResources.SendString(transmitMessage, includePrefix);
|
||||
|
||||
_serialMock.Verify(x => x.ClearBuffers(), Times.Once);
|
||||
_serialMock.Verify(x => x.Transmit(expectedMessage), Times.Once);
|
||||
@@ -123,10 +124,19 @@ namespace Meade.net.UnitTests
|
||||
|
||||
Assert.That(profeWrapper.DeviceType, Is.EqualTo("Telescope"));
|
||||
profileWrapperMock.Verify( x => x.WriteValue(DriverId, "Trace Level", profileProperties.TraceLogger.ToString()), Times.Once);
|
||||
|
||||
profileWrapperMock.Verify(x => x.WriteValue(DriverId, "COM Port", profileProperties.ComPort), Times.Once);
|
||||
profileWrapperMock.Verify(x => x.WriteValue(DriverId, "Speed", profileProperties.Speed.ToString()), Times.Once);
|
||||
profileWrapperMock.Verify(x => x.WriteValue(DriverId, "Data Bits", profileProperties.DataBits.ToString()), Times.Once);
|
||||
profileWrapperMock.Verify(x => x.WriteValue(DriverId, "Stop Bits", profileProperties.StopBits), Times.Once);
|
||||
profileWrapperMock.Verify(x => x.WriteValue(DriverId, "Hand Shake", profileProperties.Handshake), Times.Once);
|
||||
profileWrapperMock.Verify(x => x.WriteValue(DriverId, "Parity", profileProperties.Parity), Times.Once);
|
||||
profileWrapperMock.Verify(x => x.WriteValue(DriverId, "Rts / Dtr", profileProperties.RtsDtrEnabled.ToString()), Times.Once);
|
||||
|
||||
profileWrapperMock.Verify(x => x.WriteValue(DriverId, "Guide Rate Arc Seconds Per Second", profileProperties.GuideRateArcSecondsPerSecond.ToString(CultureInfo.CurrentCulture)), Times.Once);
|
||||
profileWrapperMock.Verify(x => x.WriteValue(DriverId, "Precision", profileProperties.Precision), Times.Once);
|
||||
profileWrapperMock.Verify(x => x.WriteValue(DriverId, "Guiding Style", profileProperties.GuidingStyle), Times.Once);
|
||||
|
||||
profileWrapperMock.Verify(x => x.WriteValue(DriverId, "Backlash Compensation", profileProperties.BacklashCompensation.ToString(CultureInfo.CurrentCulture)), Times.Once);
|
||||
profileWrapperMock.Verify(x => x.WriteValue(DriverId, "Reverse Focuser Direction", profileProperties.ReverseFocusDirection.ToString()), Times.Once);
|
||||
}
|
||||
@@ -136,14 +146,30 @@ namespace Meade.net.UnitTests
|
||||
{
|
||||
string DriverId = "ASCOM.MeadeGeneric.Telescope";
|
||||
|
||||
string ComPortDefault = "COM1";
|
||||
string TraceStateDefault = "false";
|
||||
|
||||
string ComPortDefault = "COM1";
|
||||
string SpeedDefault = "9600";
|
||||
string DataBitsDefault = "8";
|
||||
string StopBitsDefault = "One";
|
||||
string HandshakeDefault = "None";
|
||||
string ParityDefault = "None";
|
||||
string RtsDtrEnabledDefault = "true";
|
||||
|
||||
string GuideRateProfileNameDefault = "10.077939"; //67% of sidereal rate
|
||||
string PrecisionDefault = "Unchanged";
|
||||
string GuidingStyleDefault = "Auto";
|
||||
|
||||
string BacklashCompensationDefault = "3000";
|
||||
string ReverseFocuserDiectionDefault = "true";
|
||||
|
||||
string SendDateTimeDefault = "true";
|
||||
string SkipPromptsDefault = "true";
|
||||
|
||||
string ParkedBehaviourDefault = "No Coordinates";
|
||||
string ParkedAltDefault = "0";
|
||||
string ParkedAzimuthDefault = "180";
|
||||
|
||||
Mock<IProfileWrapper> profileWrapperMock = new Mock<IProfileWrapper>();
|
||||
profileWrapperMock.SetupAllProperties();
|
||||
|
||||
@@ -163,8 +189,46 @@ namespace Meade.net.UnitTests
|
||||
x.GetValue(DriverId, "Backlash Compensation", string.Empty, BacklashCompensationDefault))
|
||||
.Returns(BacklashCompensationDefault);
|
||||
profileWrapperMock.Setup(x =>
|
||||
x.GetValue(DriverId, "Reverse Focuser Direction", string.Empty, ReverseFocuserDiectionDefault))
|
||||
x.GetValue(DriverId, "Reverse Focuser Direction", string.Empty, "true"))
|
||||
.Returns(() => ReverseFocuserDiectionDefault);
|
||||
profileWrapperMock.Setup(x =>
|
||||
x.GetValue(DriverId, "Speed", string.Empty, SpeedDefault))
|
||||
.Returns(() => SpeedDefault);
|
||||
profileWrapperMock.Setup(x =>
|
||||
x.GetValue(DriverId, "Data Bits", string.Empty, DataBitsDefault))
|
||||
.Returns(() => DataBitsDefault);
|
||||
profileWrapperMock.Setup(x =>
|
||||
x.GetValue(DriverId, "Stop Bits", string.Empty, StopBitsDefault))
|
||||
.Returns(() => StopBitsDefault);
|
||||
profileWrapperMock.Setup(x =>
|
||||
x.GetValue(DriverId, "Hand Shake", string.Empty, HandshakeDefault))
|
||||
.Returns(() => HandshakeDefault);
|
||||
profileWrapperMock.Setup(x =>
|
||||
x.GetValue(DriverId, "Parity", string.Empty, ParityDefault))
|
||||
.Returns(() => ParityDefault);
|
||||
profileWrapperMock.Setup(x =>
|
||||
x.GetValue(DriverId, "Rts / Dtr", string.Empty, "false"))
|
||||
.Returns(() => RtsDtrEnabledDefault);
|
||||
|
||||
profileWrapperMock.Setup(x =>
|
||||
x.GetValue(DriverId, "Parked Behaviour", string.Empty, ParkedBehaviourDefault))
|
||||
.Returns(() => ParityDefault);
|
||||
profileWrapperMock.Setup(x =>
|
||||
x.GetValue(DriverId, "Parked Altitude", string.Empty, ParkedAltDefault))
|
||||
.Returns(() => ParkedAltDefault);
|
||||
profileWrapperMock.Setup(x =>
|
||||
x.GetValue(DriverId, "Parked Azimuth", string.Empty, ParkedAzimuthDefault))
|
||||
.Returns(() => ParkedAzimuthDefault);
|
||||
|
||||
profileWrapperMock.Setup(x =>
|
||||
x.GetValue(DriverId, "Send Date and time on connect", string.Empty, "false"))
|
||||
.Returns(() => SendDateTimeDefault);
|
||||
|
||||
profileWrapperMock.Setup(x =>
|
||||
x.GetValue(DriverId, "Skip date prompts on connect", string.Empty, "false"))
|
||||
.Returns(() => SkipPromptsDefault);
|
||||
|
||||
|
||||
|
||||
IProfileWrapper profeWrapper = profileWrapperMock.Object;
|
||||
|
||||
@@ -176,14 +240,27 @@ namespace Meade.net.UnitTests
|
||||
var profileProperties = SharedResources.ReadProfile();
|
||||
|
||||
Assert.That(profeWrapper.DeviceType, Is.EqualTo("Telescope"));
|
||||
|
||||
Assert.That(profileProperties.TraceLogger, Is.EqualTo(bool.Parse(TraceStateDefault)));
|
||||
|
||||
Assert.That(profileProperties.ComPort, Is.EqualTo(ComPortDefault));
|
||||
|
||||
Assert.That(profileProperties.GuideRateArcSecondsPerSecond,
|
||||
Is.EqualTo(double.Parse(GuideRateProfileNameDefault)));
|
||||
Assert.That(profileProperties.TraceLogger, Is.EqualTo(bool.Parse(TraceStateDefault)));
|
||||
Assert.That(profileProperties.Precision, Is.EqualTo(PrecisionDefault));
|
||||
Assert.That(profileProperties.GuidingStyle, Is.EqualTo(GuidingStyleDefault));
|
||||
|
||||
Assert.That(profileProperties.BacklashCompensation, Is.EqualTo(int.Parse(BacklashCompensationDefault)));
|
||||
Assert.That(profileProperties.ReverseFocusDirection, Is.EqualTo(bool.Parse(ReverseFocuserDiectionDefault)));
|
||||
|
||||
Assert.That(profileProperties.Speed, Is.EqualTo(int.Parse(SpeedDefault)));
|
||||
Assert.That(profileProperties.DataBits, Is.EqualTo(int.Parse(DataBitsDefault)));
|
||||
Assert.That(profileProperties.StopBits, Is.EqualTo(StopBitsDefault));
|
||||
Assert.That(profileProperties.Handshake, Is.EqualTo(HandshakeDefault));
|
||||
Assert.That(profileProperties.Parity, Is.EqualTo(ParityDefault));
|
||||
Assert.That(profileProperties.RtsDtrEnabled, Is.EqualTo(bool.Parse(RtsDtrEnabledDefault)));
|
||||
|
||||
Assert.That(profileProperties.SendDateTime, Is.EqualTo(bool.Parse(SendDateTimeDefault)));
|
||||
}
|
||||
|
||||
[TestCase("TCP")]
|
||||
@@ -199,27 +276,66 @@ namespace Meade.net.UnitTests
|
||||
public void Connect_WhenDeviceIdIsSerialButGVPEchos_ThenThrowsException()
|
||||
{
|
||||
string deviceId = "Serial";
|
||||
|
||||
string driverDriverId = "ASCOM.MeadeGeneric.Telescope";
|
||||
string DriverId = "ASCOM.MeadeGeneric.Telescope";
|
||||
|
||||
string ComPortDefault = "COM1";
|
||||
string SpeedDefault = "9600";
|
||||
string DataBitsDefault = "8";
|
||||
string StopBitsDefault = "One";
|
||||
string HandshakeDefault = "None";
|
||||
string ParityDefault = "None";
|
||||
string RtsDtrEnabledDefault = "false";
|
||||
|
||||
string TraceStateDefault = "false";
|
||||
string GuideRateProfileNameDefault = "10.077939"; //67% of sidereal rate
|
||||
string PrecisionDefault = "Unchanged";
|
||||
|
||||
string ParkedBehaviourDefault = "No Coordinates";
|
||||
string ParkedAltDefault = "0";
|
||||
string ParkedAzimuthDefault = "180";
|
||||
|
||||
Mock<IProfileWrapper> profileWrapperMock = new Mock<IProfileWrapper>();
|
||||
profileWrapperMock.SetupAllProperties();
|
||||
|
||||
profileWrapperMock.Setup(x => x.GetValue(driverDriverId, "Trace Level", string.Empty, TraceStateDefault))
|
||||
profileWrapperMock.Setup(x => x.GetValue(DriverId, "Trace Level", string.Empty, TraceStateDefault))
|
||||
.Returns(TraceStateDefault);
|
||||
profileWrapperMock.Setup(x => x.GetValue(driverDriverId, "COM Port", string.Empty, ComPortDefault))
|
||||
profileWrapperMock.Setup(x => x.GetValue(DriverId, "COM Port", string.Empty, ComPortDefault))
|
||||
.Returns(ComPortDefault);
|
||||
profileWrapperMock.Setup(x =>
|
||||
x.GetValue(DriverId, "Speed", string.Empty, SpeedDefault))
|
||||
.Returns(() => SpeedDefault);
|
||||
profileWrapperMock.Setup(x =>
|
||||
x.GetValue(DriverId, "Data Bits", string.Empty, DataBitsDefault))
|
||||
.Returns(() => DataBitsDefault);
|
||||
profileWrapperMock.Setup(x =>
|
||||
x.GetValue(DriverId, "Stop Bits", string.Empty, StopBitsDefault))
|
||||
.Returns(() => StopBitsDefault);
|
||||
profileWrapperMock.Setup(x =>
|
||||
x.GetValue(DriverId, "Hand Shake", string.Empty, HandshakeDefault))
|
||||
.Returns(() => HandshakeDefault);
|
||||
profileWrapperMock.Setup(x =>
|
||||
x.GetValue(DriverId, "Parity", string.Empty, ParityDefault))
|
||||
.Returns(() => ParityDefault);
|
||||
profileWrapperMock.Setup(x =>
|
||||
x.GetValue(DriverId, "Rts / Dtr", string.Empty, RtsDtrEnabledDefault))
|
||||
.Returns(() => RtsDtrEnabledDefault);
|
||||
|
||||
profileWrapperMock
|
||||
.Setup(x => x.GetValue(driverDriverId, "Guide Rate Arc Seconds Per Second", string.Empty,
|
||||
.Setup(x => x.GetValue(DriverId, "Guide Rate Arc Seconds Per Second", string.Empty,
|
||||
GuideRateProfileNameDefault)).Returns(GuideRateProfileNameDefault);
|
||||
profileWrapperMock.Setup(x => x.GetValue(driverDriverId, "Precision", string.Empty, PrecisionDefault))
|
||||
profileWrapperMock.Setup(x => x.GetValue(DriverId, "Precision", string.Empty, PrecisionDefault))
|
||||
.Returns(PrecisionDefault);
|
||||
|
||||
profileWrapperMock.Setup(x =>
|
||||
x.GetValue(DriverId, "Parked Behaviour", string.Empty, ParkedBehaviourDefault))
|
||||
.Returns(() => ParityDefault);
|
||||
profileWrapperMock.Setup(x =>
|
||||
x.GetValue(DriverId, "Parked Altitude", string.Empty, ParkedAltDefault))
|
||||
.Returns(() => ParkedAltDefault);
|
||||
profileWrapperMock.Setup(x =>
|
||||
x.GetValue(DriverId, "Parked Azimuth", string.Empty, ParkedAzimuthDefault))
|
||||
.Returns(() => ParkedAzimuthDefault);
|
||||
|
||||
Mock<IProfileFactory> profileFactoryMock = new Mock<IProfileFactory>();
|
||||
profileFactoryMock.Setup(x => x.Create()).Returns(profileWrapperMock.Object);
|
||||
|
||||
@@ -239,26 +355,65 @@ namespace Meade.net.UnitTests
|
||||
public void Connect_WhenDeviceIdIsSerialButGVPNotSupported_ThenConnectsAndSetsProductToLX200Classic()
|
||||
{
|
||||
string deviceId = "Serial";
|
||||
string DriverId = "ASCOM.MeadeGeneric.Telescope";
|
||||
|
||||
string driverDriverId = "ASCOM.MeadeGeneric.Telescope";
|
||||
string TraceStateDefault = "false";
|
||||
|
||||
string ComPortDefault = "COM1";
|
||||
string TraceStateDefault = "false";
|
||||
string SpeedDefault = "9600";
|
||||
string DataBitsDefault = "8";
|
||||
string StopBitsDefault = "One";
|
||||
string HandshakeDefault = "None";
|
||||
string ParityDefault = "None";
|
||||
string RtsDtrEnabledDefault = "false";
|
||||
|
||||
string GuideRateProfileNameDefault = "10.077939"; //67% of sidereal rate
|
||||
string PrecisionDefault = "Unchanged";
|
||||
|
||||
string ParkedBehaviourDefault = "No Coordinates";
|
||||
string ParkedAltDefault = "0";
|
||||
string ParkedAzimuthDefault = "180";
|
||||
|
||||
Mock<IProfileWrapper> profileWrapperMock = new Mock<IProfileWrapper>();
|
||||
profileWrapperMock.SetupAllProperties();
|
||||
|
||||
profileWrapperMock.Setup(x => x.GetValue(driverDriverId, "Trace Level", string.Empty, TraceStateDefault))
|
||||
profileWrapperMock.Setup(x => x.GetValue(DriverId, "Trace Level", string.Empty, TraceStateDefault))
|
||||
.Returns(TraceStateDefault);
|
||||
profileWrapperMock.Setup(x => x.GetValue(driverDriverId, "COM Port", string.Empty, ComPortDefault))
|
||||
profileWrapperMock.Setup(x => x.GetValue(DriverId, "COM Port", string.Empty, ComPortDefault))
|
||||
.Returns(ComPortDefault);
|
||||
profileWrapperMock
|
||||
.Setup(x => x.GetValue(driverDriverId, "Guide Rate Arc Seconds Per Second", string.Empty,
|
||||
.Setup(x => x.GetValue(DriverId, "Guide Rate Arc Seconds Per Second", string.Empty,
|
||||
GuideRateProfileNameDefault)).Returns(GuideRateProfileNameDefault);
|
||||
profileWrapperMock.Setup(x => x.GetValue(driverDriverId, "Precision", string.Empty, PrecisionDefault))
|
||||
profileWrapperMock.Setup(x => x.GetValue(DriverId, "Precision", string.Empty, PrecisionDefault))
|
||||
.Returns(PrecisionDefault);
|
||||
profileWrapperMock.Setup(x =>
|
||||
x.GetValue(DriverId, "Speed", string.Empty, SpeedDefault))
|
||||
.Returns(() => SpeedDefault);
|
||||
profileWrapperMock.Setup(x =>
|
||||
x.GetValue(DriverId, "Data Bits", string.Empty, DataBitsDefault))
|
||||
.Returns(() => DataBitsDefault);
|
||||
profileWrapperMock.Setup(x =>
|
||||
x.GetValue(DriverId, "Stop Bits", string.Empty, StopBitsDefault))
|
||||
.Returns(() => StopBitsDefault);
|
||||
profileWrapperMock.Setup(x =>
|
||||
x.GetValue(DriverId, "Hand Shake", string.Empty, HandshakeDefault))
|
||||
.Returns(() => HandshakeDefault);
|
||||
profileWrapperMock.Setup(x =>
|
||||
x.GetValue(DriverId, "Parity", string.Empty, ParityDefault))
|
||||
.Returns(() => ParityDefault);
|
||||
profileWrapperMock.Setup(x =>
|
||||
x.GetValue(DriverId, "Rts / Dtr", string.Empty, RtsDtrEnabledDefault))
|
||||
.Returns(() => RtsDtrEnabledDefault);
|
||||
|
||||
profileWrapperMock.Setup(x =>
|
||||
x.GetValue(DriverId, "Parked Behaviour", string.Empty, ParkedBehaviourDefault))
|
||||
.Returns(() => ParityDefault);
|
||||
profileWrapperMock.Setup(x =>
|
||||
x.GetValue(DriverId, "Parked Altitude", string.Empty, ParkedAltDefault))
|
||||
.Returns(() => ParkedAltDefault);
|
||||
profileWrapperMock.Setup(x =>
|
||||
x.GetValue(DriverId, "Parked Azimuth", string.Empty, ParkedAzimuthDefault))
|
||||
.Returns(() => ParkedAzimuthDefault);
|
||||
|
||||
Mock<IProfileFactory> profileFactoryMock = new Mock<IProfileFactory>();
|
||||
profileFactoryMock.Setup(x => x.Create()).Returns(profileWrapperMock.Object);
|
||||
@@ -293,25 +448,65 @@ namespace Meade.net.UnitTests
|
||||
{
|
||||
string deviceId = "Serial";
|
||||
|
||||
string driverDriverId = "ASCOM.MeadeGeneric.Telescope";
|
||||
string DriverId = "ASCOM.MeadeGeneric.Telescope";
|
||||
|
||||
string TraceStateDefault = "false";
|
||||
|
||||
string ComPortDefault = "COM1";
|
||||
string TraceStateDefault = "false";
|
||||
string SpeedDefault = "9600";
|
||||
string DataBitsDefault = "8";
|
||||
string StopBitsDefault = "One";
|
||||
string HandshakeDefault = "None";
|
||||
string ParityDefault = "None";
|
||||
string RtsDtrEnabledDefault = "false";
|
||||
|
||||
string GuideRateProfileNameDefault = "10.077939"; //67% of sidereal rate
|
||||
string PrecisionDefault = "Unchanged";
|
||||
|
||||
string ParkedBehaviourDefault = "No Coordinates";
|
||||
string ParkedAltDefault = "0";
|
||||
string ParkedAzimuthDefault = "180";
|
||||
|
||||
Mock<IProfileWrapper> profileWrapperMock = new Mock<IProfileWrapper>();
|
||||
profileWrapperMock.SetupAllProperties();
|
||||
|
||||
profileWrapperMock.Setup(x => x.GetValue(driverDriverId, "Trace Level", string.Empty, TraceStateDefault))
|
||||
profileWrapperMock.Setup(x => x.GetValue(DriverId, "Trace Level", string.Empty, TraceStateDefault))
|
||||
.Returns(TraceStateDefault);
|
||||
profileWrapperMock.Setup(x => x.GetValue(driverDriverId, "COM Port", string.Empty, ComPortDefault))
|
||||
profileWrapperMock.Setup(x => x.GetValue(DriverId, "COM Port", string.Empty, ComPortDefault))
|
||||
.Returns(ComPortDefault);
|
||||
profileWrapperMock
|
||||
.Setup(x => x.GetValue(driverDriverId, "Guide Rate Arc Seconds Per Second", string.Empty,
|
||||
.Setup(x => x.GetValue(DriverId, "Guide Rate Arc Seconds Per Second", string.Empty,
|
||||
GuideRateProfileNameDefault)).Returns(GuideRateProfileNameDefault);
|
||||
profileWrapperMock.Setup(x => x.GetValue(driverDriverId, "Precision", string.Empty, PrecisionDefault))
|
||||
profileWrapperMock.Setup(x => x.GetValue(DriverId, "Precision", string.Empty, PrecisionDefault))
|
||||
.Returns(PrecisionDefault);
|
||||
profileWrapperMock.Setup(x =>
|
||||
x.GetValue(DriverId, "Speed", string.Empty, SpeedDefault))
|
||||
.Returns(() => SpeedDefault);
|
||||
profileWrapperMock.Setup(x =>
|
||||
x.GetValue(DriverId, "Data Bits", string.Empty, DataBitsDefault))
|
||||
.Returns(() => DataBitsDefault);
|
||||
profileWrapperMock.Setup(x =>
|
||||
x.GetValue(DriverId, "Stop Bits", string.Empty, StopBitsDefault))
|
||||
.Returns(() => StopBitsDefault);
|
||||
profileWrapperMock.Setup(x =>
|
||||
x.GetValue(DriverId, "Hand Shake", string.Empty, HandshakeDefault))
|
||||
.Returns(() => HandshakeDefault);
|
||||
profileWrapperMock.Setup(x =>
|
||||
x.GetValue(DriverId, "Parity", string.Empty, ParityDefault))
|
||||
.Returns(() => ParityDefault);
|
||||
profileWrapperMock.Setup(x =>
|
||||
x.GetValue(DriverId, "Rts / Dtr", string.Empty, RtsDtrEnabledDefault))
|
||||
.Returns(() => RtsDtrEnabledDefault);
|
||||
|
||||
profileWrapperMock.Setup(x =>
|
||||
x.GetValue(DriverId, "Parked Behaviour", string.Empty, ParkedBehaviourDefault))
|
||||
.Returns(() => ParityDefault);
|
||||
profileWrapperMock.Setup(x =>
|
||||
x.GetValue(DriverId, "Parked Altitude", string.Empty, ParkedAltDefault))
|
||||
.Returns(() => ParkedAltDefault);
|
||||
profileWrapperMock.Setup(x =>
|
||||
x.GetValue(DriverId, "Parked Azimuth", string.Empty, ParkedAzimuthDefault))
|
||||
.Returns(() => ParkedAzimuthDefault);
|
||||
|
||||
Mock<IProfileFactory> profileFactoryMock = new Mock<IProfileFactory>();
|
||||
profileFactoryMock.Setup(x => x.Create()).Returns(profileWrapperMock.Object);
|
||||
@@ -343,25 +538,64 @@ namespace Meade.net.UnitTests
|
||||
{
|
||||
string deviceId = "Serial";
|
||||
|
||||
string driverDriverId = "ASCOM.MeadeGeneric.Telescope";
|
||||
string DriverId = "ASCOM.MeadeGeneric.Telescope";
|
||||
|
||||
string TraceStateDefault = "false";
|
||||
|
||||
string ComPortDefault = "COM1";
|
||||
string TraceStateDefault = "false";
|
||||
string SpeedDefault = "9600";
|
||||
string DataBitsDefault = "8";
|
||||
string StopBitsDefault = "One";
|
||||
string HandshakeDefault = "None";
|
||||
string ParityDefault = "None";
|
||||
string RtsDtrEnabledDefault = "false";
|
||||
|
||||
string GuideRateProfileNameDefault = "10.077939"; //67% of sidereal rate
|
||||
string PrecisionDefault = "Unchanged";
|
||||
|
||||
string ParkedBehaviourDefault = "No Coordinates";
|
||||
string ParkedAltDefault = "0";
|
||||
string ParkedAzimuthDefault = "180";
|
||||
|
||||
Mock<IProfileWrapper> profileWrapperMock = new Mock<IProfileWrapper>();
|
||||
profileWrapperMock.SetupAllProperties();
|
||||
|
||||
profileWrapperMock.Setup(x => x.GetValue(driverDriverId, "Trace Level", string.Empty, TraceStateDefault))
|
||||
profileWrapperMock.Setup(x => x.GetValue(DriverId, "Trace Level", string.Empty, TraceStateDefault))
|
||||
.Returns(TraceStateDefault);
|
||||
profileWrapperMock.Setup(x => x.GetValue(driverDriverId, "COM Port", string.Empty, ComPortDefault))
|
||||
profileWrapperMock.Setup(x => x.GetValue(DriverId, "COM Port", string.Empty, ComPortDefault))
|
||||
.Returns(ComPortDefault);
|
||||
profileWrapperMock
|
||||
.Setup(x => x.GetValue(driverDriverId, "Guide Rate Arc Seconds Per Second", string.Empty,
|
||||
.Setup(x => x.GetValue(DriverId, "Guide Rate Arc Seconds Per Second", string.Empty,
|
||||
GuideRateProfileNameDefault)).Returns(GuideRateProfileNameDefault);
|
||||
profileWrapperMock.Setup(x => x.GetValue(driverDriverId, "Precision", string.Empty, PrecisionDefault))
|
||||
profileWrapperMock.Setup(x => x.GetValue(DriverId, "Precision", string.Empty, PrecisionDefault))
|
||||
.Returns(PrecisionDefault);
|
||||
profileWrapperMock.Setup(x =>
|
||||
x.GetValue(DriverId, "Speed", string.Empty, SpeedDefault))
|
||||
.Returns(() => SpeedDefault);
|
||||
profileWrapperMock.Setup(x =>
|
||||
x.GetValue(DriverId, "Data Bits", string.Empty, DataBitsDefault))
|
||||
.Returns(() => DataBitsDefault);
|
||||
profileWrapperMock.Setup(x =>
|
||||
x.GetValue(DriverId, "Stop Bits", string.Empty, StopBitsDefault))
|
||||
.Returns(() => StopBitsDefault);
|
||||
profileWrapperMock.Setup(x =>
|
||||
x.GetValue(DriverId, "Hand Shake", string.Empty, HandshakeDefault))
|
||||
.Returns(() => HandshakeDefault);
|
||||
profileWrapperMock.Setup(x =>
|
||||
x.GetValue(DriverId, "Parity", string.Empty, ParityDefault))
|
||||
.Returns(() => ParityDefault);
|
||||
profileWrapperMock.Setup(x =>
|
||||
x.GetValue(DriverId, "Rts / Dtr", string.Empty, RtsDtrEnabledDefault))
|
||||
.Returns(() => RtsDtrEnabledDefault);
|
||||
profileWrapperMock.Setup(x =>
|
||||
x.GetValue(DriverId, "Parked Behaviour", string.Empty, ParkedBehaviourDefault))
|
||||
.Returns(() => ParityDefault);
|
||||
profileWrapperMock.Setup(x =>
|
||||
x.GetValue(DriverId, "Parked Altitude", string.Empty, ParkedAltDefault))
|
||||
.Returns(() => ParkedAltDefault);
|
||||
profileWrapperMock.Setup(x =>
|
||||
x.GetValue(DriverId, "Parked Azimuth", string.Empty, ParkedAzimuthDefault))
|
||||
.Returns(() => ParkedAzimuthDefault);
|
||||
|
||||
Mock<IProfileFactory> profileFactoryMock = new Mock<IProfileFactory>();
|
||||
profileFactoryMock.Setup(x => x.Create()).Returns(profileWrapperMock.Object);
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
|
||||
namespace ASCOM.Meade.net
|
||||
{
|
||||
public static class EnumExtensionMethods
|
||||
{
|
||||
public static string GetDescription(this Enum GenericEnum)
|
||||
{
|
||||
var genericEnumType = GenericEnum.GetType();
|
||||
var memberInfo = genericEnumType.GetMember(GenericEnum.ToString());
|
||||
if (memberInfo.Length > 0)
|
||||
{
|
||||
var _Attribs = memberInfo[0]
|
||||
.GetCustomAttributes(typeof(System.ComponentModel.DescriptionAttribute), false);
|
||||
if (_Attribs.Any())
|
||||
{
|
||||
return ((System.ComponentModel.DescriptionAttribute) _Attribs.ElementAt(0)).Description;
|
||||
}
|
||||
}
|
||||
|
||||
return GenericEnum.ToString();
|
||||
}
|
||||
|
||||
public static T GetValueFromDescription<T>( string description) where T : Enum
|
||||
{
|
||||
foreach (T value in Enum.GetValues(typeof(T)))
|
||||
{
|
||||
if (value.GetDescription() == description)
|
||||
{
|
||||
return value;
|
||||
}
|
||||
}
|
||||
|
||||
return default;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -129,6 +129,7 @@
|
||||
<Compile Include="AssemblyInfo.cs" />
|
||||
<Compile Include="ClassFactory.cs" />
|
||||
<Compile Include="ConnectionInfo.cs" />
|
||||
<Compile Include="EnumExtensionMethods.cs" />
|
||||
<Compile Include="frmMain.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
@@ -136,8 +137,10 @@
|
||||
<DependentUpon>frmMain.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="GarbageCollection.cs" />
|
||||
<Compile Include="AstroMaths\HorizonCoordinates.cs" />
|
||||
<Compile Include="LocalServer.cs" />
|
||||
<Compile Include="MeadeTelescopeBase.cs" />
|
||||
<Compile Include="ParkedBehaviour.cs" />
|
||||
<Compile Include="ProfileFactory.cs" />
|
||||
<Compile Include="ProfileProperties.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
@@ -199,6 +202,7 @@
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
using ASCOM.Meade.net.AstroMaths;
|
||||
using ASCOM.Meade.net.Wrapper;
|
||||
using ASCOM.Utilities;
|
||||
|
||||
@@ -28,6 +29,9 @@ namespace ASCOM.Meade.net
|
||||
protected string GuidingStyle;
|
||||
protected double SiteElevation;
|
||||
protected short ProfileSettleTime;
|
||||
protected bool SendDateTime;
|
||||
protected ParkedBehaviour ParkedBehaviour;
|
||||
protected HorizonCoordinates ParkedAltAz;
|
||||
|
||||
protected readonly ISharedResourcesWrapper SharedResourcesWrapper;
|
||||
|
||||
@@ -69,6 +73,14 @@ namespace ASCOM.Meade.net
|
||||
GuidingStyle = profileProperties.GuidingStyle.ToLower();
|
||||
SiteElevation = profileProperties.SiteElevation;
|
||||
ProfileSettleTime = profileProperties.SettleTime;
|
||||
SendDateTime = profileProperties.SendDateTime;
|
||||
ParkedBehaviour = profileProperties.ParkedBehaviour;
|
||||
|
||||
ParkedAltAz = new HorizonCoordinates
|
||||
{
|
||||
Altitude = profileProperties.ParkedAlt,
|
||||
Azimuth = profileProperties.ParkedAz
|
||||
};
|
||||
|
||||
LogMessage("ReadProfile", $"Trace logger enabled: {Tl.Enabled}");
|
||||
LogMessage("ReadProfile", $"Com Port: {ComPort}");
|
||||
@@ -79,6 +91,10 @@ namespace ASCOM.Meade.net
|
||||
LogMessage("ReadProfile", $"Guiding Style: {GuidingStyle}");
|
||||
LogMessage("ReadProfile", $"Site Elevation: {SiteElevation}");
|
||||
LogMessage("ReadProfile", $"Settle Time after slew: {ProfileSettleTime}");
|
||||
LogMessage("ReadProfile", $"Send date and time on connect: {SendDateTime}");
|
||||
LogMessage("ReadProfile", $"Parked Behaviour: {ParkedBehaviour}");
|
||||
LogMessage("ReadProfile", $"Parked Alt: {ParkedAltAz.Altitude}");
|
||||
LogMessage("ReadProfile", $"Parked Az: {ParkedAltAz.Azimuth}");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace ASCOM.Meade.net
|
||||
{
|
||||
public enum ParkedBehaviour
|
||||
{
|
||||
[Description("No Coordinates")]
|
||||
NoCoordinates,
|
||||
[Description("Last Good Position")]
|
||||
LastGoodPosition,
|
||||
[Description("Report coordinates as")]
|
||||
ReportCoordinates
|
||||
}
|
||||
}
|
||||
@@ -14,5 +14,14 @@ namespace ASCOM.Meade.net
|
||||
public bool RtsDtrEnabled { get; set; }
|
||||
public double SiteElevation { get; set; }
|
||||
public short SettleTime { get; set; }
|
||||
public int DataBits { get; set; }
|
||||
public string StopBits { get; set; }
|
||||
public string Parity { get; set; }
|
||||
public int Speed { get; set; }
|
||||
public string Handshake { get; set; }
|
||||
public bool SendDateTime { get; set; }
|
||||
public ParkedBehaviour ParkedBehaviour { get; set; }
|
||||
public double ParkedAlt { get; set; }
|
||||
public double ParkedAz { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
@@ -7,6 +8,7 @@ using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows.Forms;
|
||||
using ASCOM.Meade.net.Properties;
|
||||
using ASCOM.Utilities;
|
||||
|
||||
namespace ASCOM.Meade.net
|
||||
{
|
||||
@@ -20,6 +22,33 @@ namespace ASCOM.Meade.net
|
||||
var assemblyInfo = new AssemblyInfo();
|
||||
|
||||
Text = string.Format(Resources.SetupDialogForm_SetupDialogForm__0__Settings___1__, assemblyInfo.Product, assemblyInfo.AssemblyVersion);
|
||||
|
||||
SetItemsFromEnum(cboStopBits.Items, typeof(SerialStopBits));
|
||||
SetItemsFromEnum(cboParity.Items, typeof(SerialParity));
|
||||
SetItemsFromEnumValues(cboSpeed.Items, typeof(SerialSpeed));
|
||||
SetItemsFromEnum(cboHandShake.Items, typeof(SerialHandshake));
|
||||
SetItemsFromEnum(cboParkedBehaviour.Items, typeof(ParkedBehaviour));
|
||||
}
|
||||
|
||||
private void SetItemsFromEnum(IList items, Type enumItems)
|
||||
{
|
||||
items.Clear();
|
||||
|
||||
foreach (var value in Enum.GetValues(enumItems) )
|
||||
{
|
||||
var val = value as Enum;
|
||||
items.Add(val.GetDescription());
|
||||
}
|
||||
}
|
||||
|
||||
private void SetItemsFromEnumValues(IList items, Type enumItems)
|
||||
{
|
||||
items.Clear();
|
||||
|
||||
foreach (int item in Enum.GetValues(enumItems))
|
||||
{
|
||||
items.Add(item);
|
||||
}
|
||||
}
|
||||
|
||||
public sealed override string Text
|
||||
@@ -83,12 +112,83 @@ namespace ASCOM.Meade.net
|
||||
cboGuidingStyle.SelectedItem = "Auto";
|
||||
}
|
||||
|
||||
numDatabits.Value = profileProperties.DataBits;
|
||||
|
||||
try
|
||||
{
|
||||
cboStopBits.SelectedItem = profileProperties.StopBits;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
cboStopBits.SelectedItem = "One";
|
||||
}
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
cboParity.SelectedItem = profileProperties.Parity;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
cboParity.SelectedItem = "None";
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
cboSpeed.SelectedItem = profileProperties.Speed;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
cboParity.SelectedItem = "9600";
|
||||
}
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
cboHandShake.SelectedItem = profileProperties.Handshake;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
cboHandShake.SelectedItem = "None";
|
||||
}
|
||||
|
||||
txtBacklashSteps.Text = profileProperties.BacklashCompensation.ToString(CultureInfo.CurrentCulture);
|
||||
txtElevation.Text = profileProperties.SiteElevation.ToString(CultureInfo.CurrentCulture);
|
||||
|
||||
cbxReverseDirection.Checked = profileProperties.ReverseFocusDirection;
|
||||
cbxDynamicBreaking.Checked = profileProperties.DynamicBreaking;
|
||||
nudSettleTime.Value = profileProperties.SettleTime;
|
||||
|
||||
cbxSendDateTime.Checked = profileProperties.SendDateTime;
|
||||
|
||||
try
|
||||
{
|
||||
cboParkedBehaviour.SelectedItem = profileProperties.ParkedBehaviour.GetDescription();
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
cboParkedBehaviour.SelectedItem = ParkedBehaviour.NoCoordinates.GetDescription();
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
txtParkedAlt.Text = profileProperties.ParkedAlt.ToString(CultureInfo.CurrentCulture);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
txtParkedAlt.Text = "0";
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
txtParkedAz.Text = profileProperties.ParkedAz.ToString(CultureInfo.CurrentCulture);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
txtParkedAz.Text = "180";
|
||||
}
|
||||
|
||||
UpdateParkedItemsEnabled();
|
||||
}
|
||||
|
||||
public ProfileProperties GetProfile()
|
||||
@@ -98,6 +198,11 @@ namespace ASCOM.Meade.net
|
||||
TraceLogger = chkTrace.Checked,
|
||||
ComPort = comboBoxComPort.SelectedItem.ToString(),
|
||||
RtsDtrEnabled = cbxRtsDtr.Checked,
|
||||
DataBits = Convert.ToInt32(numDatabits.Value),
|
||||
StopBits = cboStopBits.SelectedItem.ToString(),
|
||||
Parity = cboParity.SelectedItem.ToString(),
|
||||
Speed = Convert.ToInt32(cboSpeed.SelectedItem),
|
||||
Handshake = cboHandShake.SelectedItem.ToString(),
|
||||
GuideRateArcSecondsPerSecond = double.Parse(txtGuideRate.Text.Trim()),
|
||||
Precision = cboPrecision.SelectedItem.ToString(),
|
||||
GuidingStyle = cboGuidingStyle.SelectedItem.ToString(),
|
||||
@@ -105,7 +210,11 @@ namespace ASCOM.Meade.net
|
||||
ReverseFocusDirection = cbxReverseDirection.Checked,
|
||||
DynamicBreaking = cbxDynamicBreaking.Checked,
|
||||
SiteElevation = double.Parse(txtElevation.Text),
|
||||
SettleTime = Convert.ToInt16(nudSettleTime.Value)
|
||||
SettleTime = Convert.ToInt16(nudSettleTime.Value),
|
||||
SendDateTime = cbxSendDateTime.Checked,
|
||||
ParkedBehaviour = EnumExtensionMethods.GetValueFromDescription<ParkedBehaviour>(cboParkedBehaviour.SelectedItem.ToString()),
|
||||
ParkedAlt = double.Parse(txtParkedAlt.Text),
|
||||
ParkedAz = double.Parse(txtParkedAz.Text)
|
||||
};
|
||||
|
||||
return profileProperties;
|
||||
@@ -182,5 +291,36 @@ namespace ASCOM.Meade.net
|
||||
txtBacklashSteps.Text = txtElevation.Text.Remove(txtBacklashSteps.Text.Length - 1);
|
||||
}
|
||||
}
|
||||
|
||||
private void cboParkedBehaviour_SelectionChangeCommitted(object sender, EventArgs e)
|
||||
{
|
||||
UpdateParkedItemsEnabled();
|
||||
}
|
||||
|
||||
private void UpdateParkedItemsEnabled()
|
||||
{
|
||||
txtParkedAlt.Enabled = cboParkedBehaviour.SelectedItem?.ToString() == "Report coordinates as";
|
||||
txtParkedAz.Enabled = txtParkedAlt.Enabled;
|
||||
}
|
||||
|
||||
private void txtParkedAlt_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (System.Text.RegularExpressions.Regex.IsMatch(txtParkedAlt.Text, "[^0-9]"))
|
||||
{
|
||||
MessageBox.Show(Resources.SetupDialogForm_txtElevation_TextChanged_1_Please_enter_only_numbers_);
|
||||
txtParkedAlt.Text = txtParkedAlt.Text.Remove(txtParkedAlt.Text.Length - 1);
|
||||
}
|
||||
}
|
||||
|
||||
private void txtParkedAz_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (System.Text.RegularExpressions.Regex.IsMatch(txtParkedAz.Text, "[^0-9]"))
|
||||
{
|
||||
MessageBox.Show(Resources.SetupDialogForm_txtElevation_TextChanged_1_Please_enter_only_numbers_);
|
||||
txtParkedAz.Text = txtParkedAz.Text.Remove(txtParkedAz.Text.Length - 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Generated
+171
@@ -58,14 +58,33 @@ namespace ASCOM.Meade.net
|
||||
this.cbxDynamicBreaking = new System.Windows.Forms.CheckBox();
|
||||
this.cbxRtsDtr = new System.Windows.Forms.CheckBox();
|
||||
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
|
||||
this.cbxSendDateTime = new System.Windows.Forms.CheckBox();
|
||||
this.label12 = new System.Windows.Forms.Label();
|
||||
this.txtElevation = new System.Windows.Forms.TextBox();
|
||||
this.label13 = new System.Windows.Forms.Label();
|
||||
this.label14 = new System.Windows.Forms.Label();
|
||||
this.nudSettleTime = new System.Windows.Forms.NumericUpDown();
|
||||
this.label15 = new System.Windows.Forms.Label();
|
||||
this.label16 = new System.Windows.Forms.Label();
|
||||
this.cboStopBits = new System.Windows.Forms.ComboBox();
|
||||
this.numDatabits = new System.Windows.Forms.NumericUpDown();
|
||||
this.cboParity = new System.Windows.Forms.ComboBox();
|
||||
this.cboSpeed = new System.Windows.Forms.ComboBox();
|
||||
this.cboHandShake = new System.Windows.Forms.ComboBox();
|
||||
this.label17 = new System.Windows.Forms.Label();
|
||||
this.label18 = new System.Windows.Forms.Label();
|
||||
this.label19 = new System.Windows.Forms.Label();
|
||||
this.label20 = new System.Windows.Forms.Label();
|
||||
this.label21 = new System.Windows.Forms.Label();
|
||||
this.cboParkedBehaviour = new System.Windows.Forms.ComboBox();
|
||||
this.label22 = new System.Windows.Forms.Label();
|
||||
this.label23 = new System.Windows.Forms.Label();
|
||||
this.label24 = new System.Windows.Forms.Label();
|
||||
this.txtParkedAlt = new System.Windows.Forms.TextBox();
|
||||
this.txtParkedAz = new System.Windows.Forms.TextBox();
|
||||
((System.ComponentModel.ISupportInitialize)(this.picASCOM)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nudSettleTime)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numDatabits)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// cmdOK
|
||||
@@ -125,6 +144,7 @@ namespace ASCOM.Meade.net
|
||||
//
|
||||
resources.ApplyResources(this.txtGuideRate, "txtGuideRate");
|
||||
this.txtGuideRate.Name = "txtGuideRate";
|
||||
this.toolTip1.SetToolTip(this.txtGuideRate, resources.GetString("txtGuideRate.ToolTip"));
|
||||
this.txtGuideRate.TextChanged += new System.EventHandler(this.TextBox1_TextChanged);
|
||||
//
|
||||
// label4
|
||||
@@ -219,6 +239,13 @@ namespace ASCOM.Meade.net
|
||||
this.toolTip1.SetToolTip(this.cbxRtsDtr, resources.GetString("cbxRtsDtr.ToolTip"));
|
||||
this.cbxRtsDtr.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// cbxSendDateTime
|
||||
//
|
||||
resources.ApplyResources(this.cbxSendDateTime, "cbxSendDateTime");
|
||||
this.cbxSendDateTime.Name = "cbxSendDateTime";
|
||||
this.toolTip1.SetToolTip(this.cbxSendDateTime, resources.GetString("cbxSendDateTime.ToolTip"));
|
||||
this.cbxSendDateTime.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// label12
|
||||
//
|
||||
resources.ApplyResources(this.label12, "label12");
|
||||
@@ -255,10 +282,135 @@ namespace ASCOM.Meade.net
|
||||
resources.ApplyResources(this.label15, "label15");
|
||||
this.label15.Name = "label15";
|
||||
//
|
||||
// label16
|
||||
//
|
||||
resources.ApplyResources(this.label16, "label16");
|
||||
this.label16.Name = "label16";
|
||||
//
|
||||
// cboStopBits
|
||||
//
|
||||
this.cboStopBits.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cboStopBits.FormattingEnabled = true;
|
||||
resources.ApplyResources(this.cboStopBits, "cboStopBits");
|
||||
this.cboStopBits.Name = "cboStopBits";
|
||||
//
|
||||
// numDatabits
|
||||
//
|
||||
resources.ApplyResources(this.numDatabits, "numDatabits");
|
||||
this.numDatabits.Maximum = new decimal(new int[] {
|
||||
32767,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.numDatabits.Name = "numDatabits";
|
||||
//
|
||||
// cboParity
|
||||
//
|
||||
this.cboParity.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cboParity.FormattingEnabled = true;
|
||||
resources.ApplyResources(this.cboParity, "cboParity");
|
||||
this.cboParity.Name = "cboParity";
|
||||
//
|
||||
// cboSpeed
|
||||
//
|
||||
this.cboSpeed.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cboSpeed.FormattingEnabled = true;
|
||||
resources.ApplyResources(this.cboSpeed, "cboSpeed");
|
||||
this.cboSpeed.Name = "cboSpeed";
|
||||
//
|
||||
// cboHandShake
|
||||
//
|
||||
this.cboHandShake.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cboHandShake.FormattingEnabled = true;
|
||||
resources.ApplyResources(this.cboHandShake, "cboHandShake");
|
||||
this.cboHandShake.Name = "cboHandShake";
|
||||
//
|
||||
// label17
|
||||
//
|
||||
resources.ApplyResources(this.label17, "label17");
|
||||
this.label17.Name = "label17";
|
||||
//
|
||||
// label18
|
||||
//
|
||||
resources.ApplyResources(this.label18, "label18");
|
||||
this.label18.Name = "label18";
|
||||
//
|
||||
// label19
|
||||
//
|
||||
resources.ApplyResources(this.label19, "label19");
|
||||
this.label19.Name = "label19";
|
||||
//
|
||||
// label20
|
||||
//
|
||||
resources.ApplyResources(this.label20, "label20");
|
||||
this.label20.Name = "label20";
|
||||
//
|
||||
// label21
|
||||
//
|
||||
resources.ApplyResources(this.label21, "label21");
|
||||
this.label21.Name = "label21";
|
||||
//
|
||||
// cboParkedBehaviour
|
||||
//
|
||||
this.cboParkedBehaviour.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cboParkedBehaviour.FormattingEnabled = true;
|
||||
this.cboParkedBehaviour.Items.AddRange(new object[] {
|
||||
resources.GetString("cboParkedBehaviour.Items"),
|
||||
resources.GetString("cboParkedBehaviour.Items1"),
|
||||
resources.GetString("cboParkedBehaviour.Items2")});
|
||||
resources.ApplyResources(this.cboParkedBehaviour, "cboParkedBehaviour");
|
||||
this.cboParkedBehaviour.Name = "cboParkedBehaviour";
|
||||
this.cboParkedBehaviour.SelectionChangeCommitted += new System.EventHandler(this.cboParkedBehaviour_SelectionChangeCommitted);
|
||||
//
|
||||
// label22
|
||||
//
|
||||
resources.ApplyResources(this.label22, "label22");
|
||||
this.label22.Name = "label22";
|
||||
//
|
||||
// label23
|
||||
//
|
||||
resources.ApplyResources(this.label23, "label23");
|
||||
this.label23.Name = "label23";
|
||||
//
|
||||
// label24
|
||||
//
|
||||
resources.ApplyResources(this.label24, "label24");
|
||||
this.label24.Name = "label24";
|
||||
//
|
||||
// txtParkedAlt
|
||||
//
|
||||
resources.ApplyResources(this.txtParkedAlt, "txtParkedAlt");
|
||||
this.txtParkedAlt.Name = "txtParkedAlt";
|
||||
this.txtParkedAlt.TextChanged += new System.EventHandler(this.txtParkedAlt_TextChanged);
|
||||
//
|
||||
// txtParkedAz
|
||||
//
|
||||
resources.ApplyResources(this.txtParkedAz, "txtParkedAz");
|
||||
this.txtParkedAz.Name = "txtParkedAz";
|
||||
this.txtParkedAz.TextChanged += new System.EventHandler(this.txtParkedAz_TextChanged);
|
||||
//
|
||||
// SetupDialogForm
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.txtParkedAz);
|
||||
this.Controls.Add(this.txtParkedAlt);
|
||||
this.Controls.Add(this.label24);
|
||||
this.Controls.Add(this.label23);
|
||||
this.Controls.Add(this.label22);
|
||||
this.Controls.Add(this.cboParkedBehaviour);
|
||||
this.Controls.Add(this.cbxSendDateTime);
|
||||
this.Controls.Add(this.label21);
|
||||
this.Controls.Add(this.label20);
|
||||
this.Controls.Add(this.label19);
|
||||
this.Controls.Add(this.label18);
|
||||
this.Controls.Add(this.label17);
|
||||
this.Controls.Add(this.cboHandShake);
|
||||
this.Controls.Add(this.cboSpeed);
|
||||
this.Controls.Add(this.cboParity);
|
||||
this.Controls.Add(this.numDatabits);
|
||||
this.Controls.Add(this.cboStopBits);
|
||||
this.Controls.Add(this.label16);
|
||||
this.Controls.Add(this.label15);
|
||||
this.Controls.Add(this.nudSettleTime);
|
||||
this.Controls.Add(this.label14);
|
||||
@@ -298,6 +450,7 @@ namespace ASCOM.Meade.net
|
||||
this.Shown += new System.EventHandler(this.SetupDialogForm_Shown);
|
||||
((System.ComponentModel.ISupportInitialize)(this.picASCOM)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nudSettleTime)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numDatabits)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
@@ -336,5 +489,23 @@ namespace ASCOM.Meade.net
|
||||
private Label label14;
|
||||
private NumericUpDown nudSettleTime;
|
||||
private Label label15;
|
||||
private Label label16;
|
||||
private ComboBox cboStopBits;
|
||||
private NumericUpDown numDatabits;
|
||||
private ComboBox cboParity;
|
||||
private ComboBox cboSpeed;
|
||||
private ComboBox cboHandShake;
|
||||
private Label label17;
|
||||
private Label label18;
|
||||
private Label label19;
|
||||
private Label label20;
|
||||
private Label label21;
|
||||
private CheckBox cbxSendDateTime;
|
||||
private ComboBox cboParkedBehaviour;
|
||||
private Label label22;
|
||||
private Label label23;
|
||||
private Label label24;
|
||||
private TextBox txtParkedAlt;
|
||||
private TextBox txtParkedAz;
|
||||
}
|
||||
}
|
||||
+525
-60
@@ -123,7 +123,7 @@
|
||||
</data>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="cmdOK.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>281, 457</value>
|
||||
<value>765, 391</value>
|
||||
</data>
|
||||
<data name="cmdOK.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>59, 24</value>
|
||||
@@ -145,13 +145,13 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>cmdOK.ZOrder" xml:space="preserve">
|
||||
<value>29</value>
|
||||
<value>47</value>
|
||||
</data>
|
||||
<data name="cmdCancel.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Bottom, Right</value>
|
||||
</data>
|
||||
<data name="cmdCancel.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>281, 487</value>
|
||||
<value>765, 421</value>
|
||||
</data>
|
||||
<data name="cmdCancel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>59, 25</value>
|
||||
@@ -172,7 +172,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>cmdCancel.ZOrder" xml:space="preserve">
|
||||
<value>28</value>
|
||||
<value>46</value>
|
||||
</data>
|
||||
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 9</value>
|
||||
@@ -196,13 +196,13 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label1.ZOrder" xml:space="preserve">
|
||||
<value>27</value>
|
||||
<value>45</value>
|
||||
</data>
|
||||
<data name="picASCOM.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Top, Right</value>
|
||||
</data>
|
||||
<data name="picASCOM.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>292, 9</value>
|
||||
<value>776, 9</value>
|
||||
</data>
|
||||
<data name="picASCOM.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>48, 56</value>
|
||||
@@ -223,7 +223,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>picASCOM.ZOrder" xml:space="preserve">
|
||||
<value>26</value>
|
||||
<value>44</value>
|
||||
</data>
|
||||
<data name="label2.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -250,22 +250,22 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label2.ZOrder" xml:space="preserve">
|
||||
<value>25</value>
|
||||
<value>43</value>
|
||||
</data>
|
||||
<data name="chkTrace.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="chkTrace.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>97, 137</value>
|
||||
<value>97, 305</value>
|
||||
</data>
|
||||
<data name="chkTrace.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>69, 17</value>
|
||||
<value>90, 17</value>
|
||||
</data>
|
||||
<data name="chkTrace.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="chkTrace.Text" xml:space="preserve">
|
||||
<value>Trace on</value>
|
||||
<value>Trace Log on</value>
|
||||
</data>
|
||||
<data name=">>chkTrace.Name" xml:space="preserve">
|
||||
<value>chkTrace</value>
|
||||
@@ -277,7 +277,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>chkTrace.ZOrder" xml:space="preserve">
|
||||
<value>24</value>
|
||||
<value>42</value>
|
||||
</data>
|
||||
<data name="comboBoxComPort.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>97, 87</value>
|
||||
@@ -298,13 +298,13 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>comboBoxComPort.ZOrder" xml:space="preserve">
|
||||
<value>23</value>
|
||||
<value>41</value>
|
||||
</data>
|
||||
<data name="label3.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label3.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 278</value>
|
||||
<value>290, 169</value>
|
||||
</data>
|
||||
<data name="label3.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>61, 13</value>
|
||||
@@ -325,10 +325,13 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label3.ZOrder" xml:space="preserve">
|
||||
<value>22</value>
|
||||
<value>40</value>
|
||||
</data>
|
||||
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<data name="txtGuideRate.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>97, 275</value>
|
||||
<value>375, 166</value>
|
||||
</data>
|
||||
<data name="txtGuideRate.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>46, 20</value>
|
||||
@@ -339,6 +342,9 @@
|
||||
<data name="txtGuideRate.Text" xml:space="preserve">
|
||||
<value>10.0</value>
|
||||
</data>
|
||||
<data name="txtGuideRate.ToolTip" xml:space="preserve">
|
||||
<value>LX-200GPS only</value>
|
||||
</data>
|
||||
<data name=">>txtGuideRate.Name" xml:space="preserve">
|
||||
<value>txtGuideRate</value>
|
||||
</data>
|
||||
@@ -349,13 +355,13 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>txtGuideRate.ZOrder" xml:space="preserve">
|
||||
<value>21</value>
|
||||
<value>39</value>
|
||||
</data>
|
||||
<data name="label4.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label4.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>149, 278</value>
|
||||
<value>427, 169</value>
|
||||
</data>
|
||||
<data name="label4.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>122, 13</value>
|
||||
@@ -376,13 +382,13 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label4.ZOrder" xml:space="preserve">
|
||||
<value>20</value>
|
||||
<value>38</value>
|
||||
</data>
|
||||
<data name="lblPercentOfSiderealRate.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="lblPercentOfSiderealRate.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>149, 291</value>
|
||||
<value>427, 182</value>
|
||||
</data>
|
||||
<data name="lblPercentOfSiderealRate.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>105, 13</value>
|
||||
@@ -403,13 +409,13 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>lblPercentOfSiderealRate.ZOrder" xml:space="preserve">
|
||||
<value>19</value>
|
||||
<value>37</value>
|
||||
</data>
|
||||
<data name="label5.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label5.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 310</value>
|
||||
<value>290, 201</value>
|
||||
</data>
|
||||
<data name="label5.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>50, 13</value>
|
||||
@@ -430,7 +436,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label5.ZOrder" xml:space="preserve">
|
||||
<value>18</value>
|
||||
<value>36</value>
|
||||
</data>
|
||||
<data name="cboPrecision.Items" xml:space="preserve">
|
||||
<value>Unchanged</value>
|
||||
@@ -442,7 +448,7 @@
|
||||
<value>High</value>
|
||||
</data>
|
||||
<data name="cboPrecision.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>97, 307</value>
|
||||
<value>375, 198</value>
|
||||
</data>
|
||||
<data name="cboPrecision.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>90, 21</value>
|
||||
@@ -460,7 +466,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>cboPrecision.ZOrder" xml:space="preserve">
|
||||
<value>17</value>
|
||||
<value>35</value>
|
||||
</data>
|
||||
<data name="label6.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -469,7 +475,7 @@
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="label6.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 337</value>
|
||||
<value>290, 228</value>
|
||||
</data>
|
||||
<data name="label6.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>67, 13</value>
|
||||
@@ -490,7 +496,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label6.ZOrder" xml:space="preserve">
|
||||
<value>16</value>
|
||||
<value>34</value>
|
||||
</data>
|
||||
<data name="cboGuidingStyle.Items" xml:space="preserve">
|
||||
<value>Auto</value>
|
||||
@@ -502,7 +508,7 @@
|
||||
<value>Pulse guiding</value>
|
||||
</data>
|
||||
<data name="cboGuidingStyle.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>97, 334</value>
|
||||
<value>375, 225</value>
|
||||
</data>
|
||||
<data name="cboGuidingStyle.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>90, 21</value>
|
||||
@@ -520,7 +526,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>cboGuidingStyle.ZOrder" xml:space="preserve">
|
||||
<value>15</value>
|
||||
<value>33</value>
|
||||
</data>
|
||||
<data name="label7.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -529,7 +535,7 @@
|
||||
<value>Microsoft Sans Serif, 8.25pt, style=Bold</value>
|
||||
</data>
|
||||
<data name="label7.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 176</value>
|
||||
<value>290, 67</value>
|
||||
</data>
|
||||
<data name="label7.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>66, 13</value>
|
||||
@@ -550,7 +556,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label7.ZOrder" xml:space="preserve">
|
||||
<value>14</value>
|
||||
<value>32</value>
|
||||
</data>
|
||||
<data name="label8.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -562,7 +568,7 @@
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="label8.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 393</value>
|
||||
<value>290, 284</value>
|
||||
</data>
|
||||
<data name="label8.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>52, 13</value>
|
||||
@@ -583,10 +589,10 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label8.ZOrder" xml:space="preserve">
|
||||
<value>13</value>
|
||||
<value>31</value>
|
||||
</data>
|
||||
<data name="txtBacklashSteps.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>97, 411</value>
|
||||
<value>375, 302</value>
|
||||
</data>
|
||||
<data name="txtBacklashSteps.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>46, 20</value>
|
||||
@@ -607,7 +613,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>txtBacklashSteps.ZOrder" xml:space="preserve">
|
||||
<value>11</value>
|
||||
<value>29</value>
|
||||
</data>
|
||||
<data name="label9.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -616,7 +622,7 @@
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="label9.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 414</value>
|
||||
<value>290, 305</value>
|
||||
</data>
|
||||
<data name="label9.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>79, 13</value>
|
||||
@@ -637,7 +643,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label9.ZOrder" xml:space="preserve">
|
||||
<value>12</value>
|
||||
<value>30</value>
|
||||
</data>
|
||||
<data name="label10.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -646,7 +652,7 @@
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="label10.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>149, 414</value>
|
||||
<value>427, 305</value>
|
||||
</data>
|
||||
<data name="label10.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>20, 13</value>
|
||||
@@ -667,7 +673,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label10.ZOrder" xml:space="preserve">
|
||||
<value>10</value>
|
||||
<value>28</value>
|
||||
</data>
|
||||
<data name="label11.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -700,13 +706,13 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label11.ZOrder" xml:space="preserve">
|
||||
<value>9</value>
|
||||
<value>27</value>
|
||||
</data>
|
||||
<data name="cbxReverseDirection.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="cbxReverseDirection.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>97, 437</value>
|
||||
<value>375, 328</value>
|
||||
</data>
|
||||
<data name="cbxReverseDirection.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>109, 17</value>
|
||||
@@ -727,13 +733,13 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>cbxReverseDirection.ZOrder" xml:space="preserve">
|
||||
<value>8</value>
|
||||
<value>26</value>
|
||||
</data>
|
||||
<data name="cbxDynamicBreaking.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="cbxDynamicBreaking.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>97, 460</value>
|
||||
<value>375, 351</value>
|
||||
</data>
|
||||
<data name="cbxDynamicBreaking.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>112, 17</value>
|
||||
@@ -754,11 +760,8 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>cbxDynamicBreaking.ZOrder" xml:space="preserve">
|
||||
<value>7</value>
|
||||
<value>25</value>
|
||||
</data>
|
||||
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<data name="cbxRtsDtr.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
@@ -790,16 +793,49 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>cbxRtsDtr.ZOrder" xml:space="preserve">
|
||||
<value>6</value>
|
||||
<value>24</value>
|
||||
</data>
|
||||
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<data name="cbxSendDateTime.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="cbxSendDateTime.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="cbxSendDateTime.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>671, 96</value>
|
||||
</data>
|
||||
<data name="cbxSendDateTime.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>145, 17</value>
|
||||
</data>
|
||||
<data name="cbxSendDateTime.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>41</value>
|
||||
</data>
|
||||
<data name="cbxSendDateTime.Text" xml:space="preserve">
|
||||
<value>Set current date and time</value>
|
||||
</data>
|
||||
<data name="cbxSendDateTime.ToolTip" xml:space="preserve">
|
||||
<value>Send Current Date and Time (will also skip the opening dialogs on the LX200GPS)</value>
|
||||
</data>
|
||||
<data name=">>cbxSendDateTime.Name" xml:space="preserve">
|
||||
<value>cbxSendDateTime</value>
|
||||
</data>
|
||||
<data name=">>cbxSendDateTime.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>cbxSendDateTime.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>cbxSendDateTime.ZOrder" xml:space="preserve">
|
||||
<value>6</value>
|
||||
</data>
|
||||
<data name="label12.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label12.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 205</value>
|
||||
<value>290, 96</value>
|
||||
</data>
|
||||
<data name="label12.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>72, 13</value>
|
||||
@@ -820,10 +856,10 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label12.ZOrder" xml:space="preserve">
|
||||
<value>5</value>
|
||||
<value>23</value>
|
||||
</data>
|
||||
<data name="txtElevation.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>97, 202</value>
|
||||
<value>375, 93</value>
|
||||
</data>
|
||||
<data name="txtElevation.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>100, 20</value>
|
||||
@@ -841,13 +877,13 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>txtElevation.ZOrder" xml:space="preserve">
|
||||
<value>4</value>
|
||||
<value>22</value>
|
||||
</data>
|
||||
<data name="label13.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label13.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>203, 205</value>
|
||||
<value>481, 96</value>
|
||||
</data>
|
||||
<data name="label13.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>38, 13</value>
|
||||
@@ -868,13 +904,13 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label13.ZOrder" xml:space="preserve">
|
||||
<value>3</value>
|
||||
<value>21</value>
|
||||
</data>
|
||||
<data name="label14.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label14.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 236</value>
|
||||
<value>290, 127</value>
|
||||
</data>
|
||||
<data name="label14.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>56, 13</value>
|
||||
@@ -895,10 +931,10 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label14.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
<value>20</value>
|
||||
</data>
|
||||
<data name="nudSettleTime.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>97, 234</value>
|
||||
<value>375, 125</value>
|
||||
</data>
|
||||
<data name="nudSettleTime.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>120, 20</value>
|
||||
@@ -916,13 +952,13 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>nudSettleTime.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
<value>19</value>
|
||||
</data>
|
||||
<data name="label15.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label15.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>223, 236</value>
|
||||
<value>501, 127</value>
|
||||
</data>
|
||||
<data name="label15.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>47, 13</value>
|
||||
@@ -943,16 +979,445 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label15.ZOrder" xml:space="preserve">
|
||||
<value>18</value>
|
||||
</data>
|
||||
<data name="label16.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label16.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>15, 139</value>
|
||||
</data>
|
||||
<data name="label16.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>49, 13</value>
|
||||
</data>
|
||||
<data name="label16.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>29</value>
|
||||
</data>
|
||||
<data name="label16.Text" xml:space="preserve">
|
||||
<value>Data bits</value>
|
||||
</data>
|
||||
<data name=">>label16.Name" xml:space="preserve">
|
||||
<value>label16</value>
|
||||
</data>
|
||||
<data name=">>label16.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label16.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label16.ZOrder" xml:space="preserve">
|
||||
<value>17</value>
|
||||
</data>
|
||||
<data name="cboStopBits.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>97, 163</value>
|
||||
</data>
|
||||
<data name="cboStopBits.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>119, 21</value>
|
||||
</data>
|
||||
<data name="cboStopBits.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>30</value>
|
||||
</data>
|
||||
<data name=">>cboStopBits.Name" xml:space="preserve">
|
||||
<value>cboStopBits</value>
|
||||
</data>
|
||||
<data name=">>cboStopBits.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>cboStopBits.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>cboStopBits.ZOrder" xml:space="preserve">
|
||||
<value>16</value>
|
||||
</data>
|
||||
<data name="numDatabits.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>97, 137</value>
|
||||
</data>
|
||||
<data name="numDatabits.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>120, 20</value>
|
||||
</data>
|
||||
<data name="numDatabits.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>31</value>
|
||||
</data>
|
||||
<data name=">>numDatabits.Name" xml:space="preserve">
|
||||
<value>numDatabits</value>
|
||||
</data>
|
||||
<data name=">>numDatabits.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>numDatabits.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>numDatabits.ZOrder" xml:space="preserve">
|
||||
<value>15</value>
|
||||
</data>
|
||||
<data name="cboParity.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>97, 190</value>
|
||||
</data>
|
||||
<data name="cboParity.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>119, 21</value>
|
||||
</data>
|
||||
<data name="cboParity.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>32</value>
|
||||
</data>
|
||||
<data name=">>cboParity.Name" xml:space="preserve">
|
||||
<value>cboParity</value>
|
||||
</data>
|
||||
<data name=">>cboParity.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>cboParity.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>cboParity.ZOrder" xml:space="preserve">
|
||||
<value>14</value>
|
||||
</data>
|
||||
<data name="cboSpeed.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>97, 217</value>
|
||||
</data>
|
||||
<data name="cboSpeed.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>119, 21</value>
|
||||
</data>
|
||||
<data name="cboSpeed.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>33</value>
|
||||
</data>
|
||||
<data name=">>cboSpeed.Name" xml:space="preserve">
|
||||
<value>cboSpeed</value>
|
||||
</data>
|
||||
<data name=">>cboSpeed.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>cboSpeed.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>cboSpeed.ZOrder" xml:space="preserve">
|
||||
<value>13</value>
|
||||
</data>
|
||||
<data name="cboHandShake.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>97, 244</value>
|
||||
</data>
|
||||
<data name="cboHandShake.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>121, 21</value>
|
||||
</data>
|
||||
<data name="cboHandShake.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>34</value>
|
||||
</data>
|
||||
<data name=">>cboHandShake.Name" xml:space="preserve">
|
||||
<value>cboHandShake</value>
|
||||
</data>
|
||||
<data name=">>cboHandShake.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>cboHandShake.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>cboHandShake.ZOrder" xml:space="preserve">
|
||||
<value>12</value>
|
||||
</data>
|
||||
<data name="label17.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label17.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>15, 166</value>
|
||||
</data>
|
||||
<data name="label17.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>49, 13</value>
|
||||
</data>
|
||||
<data name="label17.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>35</value>
|
||||
</data>
|
||||
<data name="label17.Text" xml:space="preserve">
|
||||
<value>Stop Bits</value>
|
||||
</data>
|
||||
<data name=">>label17.Name" xml:space="preserve">
|
||||
<value>label17</value>
|
||||
</data>
|
||||
<data name=">>label17.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label17.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label17.ZOrder" xml:space="preserve">
|
||||
<value>11</value>
|
||||
</data>
|
||||
<data name="label18.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label18.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>15, 193</value>
|
||||
</data>
|
||||
<data name="label18.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>33, 13</value>
|
||||
</data>
|
||||
<data name="label18.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>36</value>
|
||||
</data>
|
||||
<data name="label18.Text" xml:space="preserve">
|
||||
<value>Parity</value>
|
||||
</data>
|
||||
<data name=">>label18.Name" xml:space="preserve">
|
||||
<value>label18</value>
|
||||
</data>
|
||||
<data name=">>label18.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label18.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label18.ZOrder" xml:space="preserve">
|
||||
<value>10</value>
|
||||
</data>
|
||||
<data name="label19.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label19.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>15, 220</value>
|
||||
</data>
|
||||
<data name="label19.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>38, 13</value>
|
||||
</data>
|
||||
<data name="label19.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>37</value>
|
||||
</data>
|
||||
<data name="label19.Text" xml:space="preserve">
|
||||
<value>Speed</value>
|
||||
</data>
|
||||
<data name=">>label19.Name" xml:space="preserve">
|
||||
<value>label19</value>
|
||||
</data>
|
||||
<data name=">>label19.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label19.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label19.ZOrder" xml:space="preserve">
|
||||
<value>9</value>
|
||||
</data>
|
||||
<data name="label20.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label20.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>15, 247</value>
|
||||
</data>
|
||||
<data name="label20.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>62, 13</value>
|
||||
</data>
|
||||
<data name="label20.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>38</value>
|
||||
</data>
|
||||
<data name="label20.Text" xml:space="preserve">
|
||||
<value>Handshake</value>
|
||||
</data>
|
||||
<data name=">>label20.Name" xml:space="preserve">
|
||||
<value>label20</value>
|
||||
</data>
|
||||
<data name=">>label20.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label20.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label20.ZOrder" xml:space="preserve">
|
||||
<value>8</value>
|
||||
</data>
|
||||
<data name="label21.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label21.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Microsoft Sans Serif, 8.25pt, style=Bold</value>
|
||||
</data>
|
||||
<data name="label21.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="label21.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>15, 284</value>
|
||||
</data>
|
||||
<data name="label21.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>73, 13</value>
|
||||
</data>
|
||||
<data name="label21.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>39</value>
|
||||
</data>
|
||||
<data name="label21.Text" xml:space="preserve">
|
||||
<value>Diagnostics</value>
|
||||
</data>
|
||||
<data name=">>label21.Name" xml:space="preserve">
|
||||
<value>label21</value>
|
||||
</data>
|
||||
<data name=">>label21.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label21.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label21.ZOrder" xml:space="preserve">
|
||||
<value>7</value>
|
||||
</data>
|
||||
<data name="cboParkedBehaviour.Items" xml:space="preserve">
|
||||
<value>No Coordinates</value>
|
||||
</data>
|
||||
<data name="cboParkedBehaviour.Items1" xml:space="preserve">
|
||||
<value>Last Good Position</value>
|
||||
</data>
|
||||
<data name="cboParkedBehaviour.Items2" xml:space="preserve">
|
||||
<value>Report coordinates as</value>
|
||||
</data>
|
||||
<data name="cboParkedBehaviour.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>671, 124</value>
|
||||
</data>
|
||||
<data name="cboParkedBehaviour.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>126, 21</value>
|
||||
</data>
|
||||
<data name="cboParkedBehaviour.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>42</value>
|
||||
</data>
|
||||
<data name=">>cboParkedBehaviour.Name" xml:space="preserve">
|
||||
<value>cboParkedBehaviour</value>
|
||||
</data>
|
||||
<data name=">>cboParkedBehaviour.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>cboParkedBehaviour.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>cboParkedBehaviour.ZOrder" xml:space="preserve">
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name="label22.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label22.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>574, 127</value>
|
||||
</data>
|
||||
<data name="label22.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>91, 13</value>
|
||||
</data>
|
||||
<data name="label22.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>43</value>
|
||||
</data>
|
||||
<data name="label22.Text" xml:space="preserve">
|
||||
<value>Parked behaviour</value>
|
||||
</data>
|
||||
<data name=">>label22.Name" xml:space="preserve">
|
||||
<value>label22</value>
|
||||
</data>
|
||||
<data name=">>label22.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label22.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label22.ZOrder" xml:space="preserve">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="label23.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label23.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>668, 154</value>
|
||||
</data>
|
||||
<data name="label23.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>19, 13</value>
|
||||
</data>
|
||||
<data name="label23.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>44</value>
|
||||
</data>
|
||||
<data name="label23.Text" xml:space="preserve">
|
||||
<value>Alt</value>
|
||||
</data>
|
||||
<data name=">>label23.Name" xml:space="preserve">
|
||||
<value>label23</value>
|
||||
</data>
|
||||
<data name=">>label23.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label23.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label23.ZOrder" xml:space="preserve">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="label24.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label24.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>668, 180</value>
|
||||
</data>
|
||||
<data name="label24.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>19, 13</value>
|
||||
</data>
|
||||
<data name="label24.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>45</value>
|
||||
</data>
|
||||
<data name="label24.Text" xml:space="preserve">
|
||||
<value>Az</value>
|
||||
</data>
|
||||
<data name=">>label24.Name" xml:space="preserve">
|
||||
<value>label24</value>
|
||||
</data>
|
||||
<data name=">>label24.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label24.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label24.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="txtParkedAlt.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>697, 151</value>
|
||||
</data>
|
||||
<data name="txtParkedAlt.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>100, 20</value>
|
||||
</data>
|
||||
<data name="txtParkedAlt.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>46</value>
|
||||
</data>
|
||||
<data name=">>txtParkedAlt.Name" xml:space="preserve">
|
||||
<value>txtParkedAlt</value>
|
||||
</data>
|
||||
<data name=">>txtParkedAlt.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>txtParkedAlt.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>txtParkedAlt.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="txtParkedAz.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>697, 177</value>
|
||||
</data>
|
||||
<data name="txtParkedAz.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>100, 20</value>
|
||||
</data>
|
||||
<data name="txtParkedAz.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>47</value>
|
||||
</data>
|
||||
<data name=">>txtParkedAz.Name" xml:space="preserve">
|
||||
<value>txtParkedAz</value>
|
||||
</data>
|
||||
<data name=">>txtParkedAz.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>txtParkedAz.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>txtParkedAz.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>25</value>
|
||||
</metadata>
|
||||
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
|
||||
<value>6, 13</value>
|
||||
</data>
|
||||
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>350, 520</value>
|
||||
<value>834, 454</value>
|
||||
</data>
|
||||
<data name="$this.StartPosition" type="System.Windows.Forms.FormStartPosition, System.Windows.Forms">
|
||||
<value>CenterScreen</value>
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows.Forms;
|
||||
using ASCOM.Meade.net.Wrapper;
|
||||
using ASCOM.Utilities;
|
||||
@@ -93,14 +94,26 @@ namespace ASCOM.Meade.net
|
||||
/// </summary>
|
||||
/// <param name="message"></param>
|
||||
/// <returns></returns>
|
||||
public static string SendString(string message)
|
||||
public static string SendString(string message, bool includePrefix = true)
|
||||
{
|
||||
lock (LockObject)
|
||||
{
|
||||
SharedSerial.ClearBuffers();
|
||||
SharedSerial.Transmit(message);
|
||||
|
||||
SharedSerial.Transmit(includePrefix ? $"#{message}" : message);
|
||||
|
||||
try
|
||||
{
|
||||
return SharedSerial.ReceiveTerminated("#").TrimEnd('#');
|
||||
}
|
||||
catch (COMException ex)
|
||||
{
|
||||
if (ex.Message.Contains("Timed out waiting for received data"))
|
||||
throw new TimeoutException(ex.Message, ex);
|
||||
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static string SendChar(string message)
|
||||
@@ -109,8 +122,19 @@ namespace ASCOM.Meade.net
|
||||
{
|
||||
SharedSerial.ClearBuffers();
|
||||
SharedSerial.Transmit(message);
|
||||
|
||||
try
|
||||
{
|
||||
return SharedSerial.ReceiveCounted(1);
|
||||
}
|
||||
catch (COMException ex)
|
||||
{
|
||||
if (ex.Message.Contains("Timed out waiting for received data"))
|
||||
throw new TimeoutException(ex.Message, ex);
|
||||
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static string ReadTerminated()
|
||||
@@ -148,6 +172,16 @@ namespace ASCOM.Meade.net
|
||||
private const string SiteElevationName = "Site Elevation";
|
||||
private const string SettleTimeName = "Settle Time";
|
||||
|
||||
private const string SpeedName = "Speed";
|
||||
private const string DataBitsName = "Data Bits";
|
||||
private const string StopBitsName = "Stop Bits";
|
||||
private const string HandShakeName = "Hand Shake";
|
||||
private const string ParityName = "Parity";
|
||||
private const string SendDateTimeName = "Send Date and time on connect";
|
||||
private const string ParkedBehaviourName = "Parked Behaviour";
|
||||
private const string ParkedAltName = "Parked Altitude";
|
||||
private const string ParkedAzimuthName = "Parked Azimuth";
|
||||
|
||||
public static void WriteProfile(ProfileProperties profileProperties)
|
||||
{
|
||||
lock (LockObject)
|
||||
@@ -158,6 +192,11 @@ namespace ASCOM.Meade.net
|
||||
driverProfile.WriteValue(DriverId, TraceStateProfileName, profileProperties.TraceLogger.ToString());
|
||||
driverProfile.WriteValue(DriverId, ComPortProfileName, profileProperties.ComPort);
|
||||
driverProfile.WriteValue(DriverId, RtsDtrProfileName, profileProperties.RtsDtrEnabled.ToString());
|
||||
driverProfile.WriteValue(DriverId, SpeedName, profileProperties.Speed.ToString(CultureInfo.InvariantCulture));
|
||||
driverProfile.WriteValue(DriverId, DataBitsName, profileProperties.DataBits.ToString(CultureInfo.InvariantCulture));
|
||||
driverProfile.WriteValue(DriverId, StopBitsName, profileProperties.StopBits);
|
||||
driverProfile.WriteValue(DriverId, HandShakeName, profileProperties.Handshake);
|
||||
driverProfile.WriteValue(DriverId, ParityName, profileProperties.Parity);
|
||||
driverProfile.WriteValue(DriverId, GuideRateProfileName, profileProperties.GuideRateArcSecondsPerSecond.ToString(CultureInfo.InvariantCulture));
|
||||
driverProfile.WriteValue(DriverId, PrecisionProfileName, profileProperties.Precision);
|
||||
driverProfile.WriteValue(DriverId, GuidingStyleProfileName, profileProperties.GuidingStyle);
|
||||
@@ -166,6 +205,10 @@ namespace ASCOM.Meade.net
|
||||
driverProfile.WriteValue(DriverId, DynamicBreakingName, profileProperties.DynamicBreaking.ToString());
|
||||
driverProfile.WriteValue(DriverId, SiteElevationName, profileProperties.SiteElevation.ToString(CultureInfo.InvariantCulture));
|
||||
driverProfile.WriteValue(DriverId, SettleTimeName, profileProperties.SettleTime.ToString());
|
||||
driverProfile.WriteValue(DriverId, SendDateTimeName, profileProperties.SendDateTime.ToString());
|
||||
driverProfile.WriteValue(DriverId, ParkedBehaviourName, profileProperties.ParkedBehaviour.GetDescription());
|
||||
driverProfile.WriteValue(DriverId, ParkedAltName, profileProperties.ParkedAlt.ToString(CultureInfo.InvariantCulture));
|
||||
driverProfile.WriteValue(DriverId, ParkedAzimuthName, profileProperties.ParkedAz.ToString(CultureInfo.InvariantCulture));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -181,6 +224,15 @@ namespace ASCOM.Meade.net
|
||||
private const string DynamicBreakingDefault = "true";
|
||||
private const string SiteElevationDefault = "0";
|
||||
private const string SettleTimeDefault = "2";
|
||||
private const string SpeedDefault = "9600";
|
||||
private const string DataBitsDefault = "8";
|
||||
private const string StopBitsDefault = "One";
|
||||
private const string HandShakeDefault = "None";
|
||||
private const string ParityDefault = "None";
|
||||
private const string SendDateTimeDefault = "false";
|
||||
private static string ParkedBehaviourDefault = "No Coordinates";
|
||||
private const string ParkedAltDefault = "0";
|
||||
private const string ParkedAzimuthDefault = "180";
|
||||
|
||||
public static ProfileProperties ReadProfile()
|
||||
{
|
||||
@@ -201,6 +253,16 @@ namespace ASCOM.Meade.net
|
||||
profileProperties.DynamicBreaking = Convert.ToBoolean(driverProfile.GetValue(DriverId, DynamicBreakingName, string.Empty, DynamicBreakingDefault));
|
||||
profileProperties.SiteElevation = Convert.ToInt32(driverProfile.GetValue(DriverId, SiteElevationName, string.Empty, SiteElevationDefault));
|
||||
profileProperties.SettleTime = Convert.ToInt16(driverProfile.GetValue(DriverId, SettleTimeName, string.Empty, SettleTimeDefault));
|
||||
profileProperties.StopBits = driverProfile.GetValue(DriverId, StopBitsName, string.Empty, StopBitsDefault);
|
||||
profileProperties.DataBits = Convert.ToInt32(driverProfile.GetValue(DriverId, DataBitsName, string.Empty, DataBitsDefault));
|
||||
profileProperties.Handshake = driverProfile.GetValue(DriverId, HandShakeName, string.Empty, HandShakeDefault);
|
||||
profileProperties.Speed = Convert.ToInt32(driverProfile.GetValue(DriverId, SpeedName, string.Empty, SpeedDefault));
|
||||
profileProperties.Parity = driverProfile.GetValue(DriverId, ParityName, string.Empty, ParityDefault);
|
||||
profileProperties.SendDateTime = Convert.ToBoolean(driverProfile.GetValue(DriverId, SendDateTimeName, string.Empty, SendDateTimeDefault));
|
||||
|
||||
profileProperties.ParkedBehaviour = EnumExtensionMethods.GetValueFromDescription<ParkedBehaviour>(driverProfile.GetValue(DriverId, ParkedBehaviourName, string.Empty, ParkedBehaviourDefault));
|
||||
profileProperties.ParkedAlt = double.Parse(driverProfile.GetValue(DriverId, ParkedAltName, string.Empty, ParkedAltDefault), NumberFormatInfo.InvariantInfo);
|
||||
profileProperties.ParkedAz = double.Parse(driverProfile.GetValue(DriverId, ParkedAzimuthName, string.Empty, ParkedAzimuthDefault), NumberFormatInfo.InvariantInfo);
|
||||
}
|
||||
|
||||
return profileProperties;
|
||||
@@ -286,17 +348,17 @@ namespace ASCOM.Meade.net
|
||||
SharedSerial.PortName = profileProperties.ComPort;
|
||||
SharedSerial.DTREnable = profileProperties.RtsDtrEnabled;
|
||||
SharedSerial.RTSEnable = profileProperties.RtsDtrEnabled;
|
||||
SharedSerial.DataBits = 8;
|
||||
SharedSerial.StopBits = SerialStopBits.One;
|
||||
SharedSerial.Parity = SerialParity.None;
|
||||
SharedSerial.Speed = SerialSpeed.ps9600;
|
||||
SharedSerial.Handshake = SerialHandshake.None;
|
||||
SharedSerial.DataBits = profileProperties.DataBits;
|
||||
SharedSerial.StopBits = (SerialStopBits)Enum.Parse(typeof(SerialStopBits), profileProperties.StopBits );
|
||||
SharedSerial.Parity = (SerialParity)Enum.Parse(typeof(SerialParity), profileProperties.Parity);
|
||||
SharedSerial.Speed = (SerialSpeed)profileProperties.Speed;
|
||||
SharedSerial.Handshake = (SerialHandshake)Enum.Parse(typeof(SerialHandshake), profileProperties.Handshake);
|
||||
SharedSerial.Connected = true;
|
||||
|
||||
try
|
||||
{
|
||||
ProductName = SendString("#:GVP#");
|
||||
FirmwareVersion = SendString("#:GVN#");
|
||||
ProductName = SendString(":GVP#");
|
||||
FirmwareVersion = SendString(":GVN#");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -316,7 +378,7 @@ namespace ASCOM.Meade.net
|
||||
|
||||
try
|
||||
{
|
||||
string utcOffSet = SendString("#:GG#");
|
||||
string utcOffSet = SendString(":GG#");
|
||||
//:GG# Get UTC offset time
|
||||
//Returns: sHH# or sHH.H#
|
||||
//The number of decimal hours to add to local time to convert it to UTC. If the number is a whole number the
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
// ReSharper disable once InconsistentNaming
|
||||
public const string Autostar497_43Eg = "43Eg";
|
||||
|
||||
// ReSharper disable once InconsistentNaming
|
||||
public const string AudioStar_A4S4 = "A4S4";
|
||||
#endregion
|
||||
|
||||
#region LX200GPS
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace ASCOM.Meade.net.Wrapper
|
||||
void Lock(Action action);
|
||||
T Lock<T>(Func<T> func);
|
||||
|
||||
string SendString(string message);
|
||||
string SendString(string message, bool includePrefix = true);
|
||||
void SendBlind(string message);
|
||||
string SendChar(string message);
|
||||
|
||||
@@ -54,9 +54,9 @@ namespace ASCOM.Meade.net.Wrapper
|
||||
return SharedResources.Lock(func);
|
||||
}
|
||||
|
||||
public string SendString(string message)
|
||||
public string SendString(string message, bool includePrefix = true)
|
||||
{
|
||||
return SharedResources.SendString(message);
|
||||
return SharedResources.SendString(message, includePrefix);
|
||||
}
|
||||
|
||||
public void SendBlind(string message)
|
||||
|
||||
Reference in New Issue
Block a user