Added new feature to allow the guiding style to be forced, Auto = driver decides. Pulse guiding will use the newer pulse guiding technique, Guide rate slew, will use the older technique.
This commit is contained in:
@@ -34,7 +34,8 @@ namespace Meade.net.Telescope.UnitTests
|
||||
TraceLogger = false,
|
||||
ComPort = "TestCom1",
|
||||
GuideRateArcSecondsPerSecond = 1.23,
|
||||
Precision = "Unchanged"
|
||||
Precision = "Unchanged",
|
||||
GuidingStyle = "Auto"
|
||||
};
|
||||
|
||||
_utilMock = new Mock<IUtil>();
|
||||
@@ -446,17 +447,24 @@ namespace Meade.net.Telescope.UnitTests
|
||||
_sharedResourcesWrapperMock.Verify(x => x.Disconnect(It.IsAny<string>(), It.IsAny<string>()), Times.Once());
|
||||
}
|
||||
|
||||
[TestCase("Autostar", "30Ab", false)]
|
||||
[TestCase("Autostar", "31Ee", true)]
|
||||
[TestCase("Autostar", "43Eg", true)]
|
||||
[TestCase("Autostar II", "", false)]
|
||||
[TestCase("LX2001", "", true)]
|
||||
[TestCase(":GVP", "", false)] //LX200 Classic
|
||||
public void IsNewPulseGuidingSupported_ThenIsSupported_ThenReturnsTrue(string productName, string firmware, bool isSupported)
|
||||
[TestCase("Auto", "Autostar", "30Ab", false)]
|
||||
[TestCase("Auto","Autostar", "31Ee", true)]
|
||||
[TestCase("Auto","Autostar", "43Eg", true)]
|
||||
[TestCase("Auto","Autostar II", "", false)]
|
||||
[TestCase("Auto","LX2001", "", true)]
|
||||
[TestCase("Auto",":GVP", "", false)] //LX200 Classic
|
||||
[TestCase("Guide Rate Slew", "LX2001", "", false)] //force old style
|
||||
[TestCase("Pulse Guiding", ":GVP", "", true)] //force new style
|
||||
|
||||
public void IsNewPulseGuidingSupported_ThenIsSupported_ThenReturnsTrue(string guidingStyle, string productName, string firmware, bool isSupported)
|
||||
{
|
||||
_sharedResourcesWrapperMock.Setup(x => x.ProductName).Returns(productName);
|
||||
_sharedResourcesWrapperMock.Setup(x => x.FirmwareVersion).Returns(firmware);
|
||||
|
||||
_profileProperties.GuidingStyle = guidingStyle;
|
||||
|
||||
_telescope.Connected = true;
|
||||
|
||||
var result = _telescope.IsNewPulseGuidingSupported();
|
||||
|
||||
Assert.That(result, Is.EqualTo(isSupported));
|
||||
|
||||
@@ -481,17 +481,26 @@ namespace ASCOM.Meade.net
|
||||
|
||||
public bool IsNewPulseGuidingSupported()
|
||||
{
|
||||
if (_sharedResourcesWrapper.ProductName == TelescopeList.Autostar497)
|
||||
switch (_guidingStyle)
|
||||
{
|
||||
return FirmwareIsGreaterThan(TelescopeList.Autostar497_31Ee);
|
||||
}
|
||||
case "guide rate slew":
|
||||
return false;
|
||||
case "pulse guiding":
|
||||
return true;
|
||||
|
||||
if (_sharedResourcesWrapper.ProductName == TelescopeList.LX200GPS)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
default:
|
||||
if (_sharedResourcesWrapper.ProductName == TelescopeList.Autostar497)
|
||||
{
|
||||
return FirmwareIsGreaterThan(TelescopeList.Autostar497_31Ee);
|
||||
}
|
||||
|
||||
return false;
|
||||
if (_sharedResourcesWrapper.ProductName == TelescopeList.LX200GPS)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private bool IsLongFormatSupported()
|
||||
@@ -2131,6 +2140,7 @@ namespace ASCOM.Meade.net
|
||||
|
||||
private DriveRates _trackingRate = DriveRates.driveSidereal;
|
||||
private string _precision;
|
||||
private string _guidingStyle;
|
||||
|
||||
public DriveRates TrackingRate
|
||||
{
|
||||
@@ -2427,11 +2437,13 @@ namespace ASCOM.Meade.net
|
||||
_comPort = profileProperties.ComPort;
|
||||
_guideRate = profileProperties.GuideRateArcSecondsPerSecond;
|
||||
_precision = profileProperties.Precision;
|
||||
_guidingStyle = profileProperties.GuidingStyle.ToLower();
|
||||
|
||||
LogMessage("ReadProfile", $"Trace logger enabled: {_tl.Enabled}");
|
||||
LogMessage("ReadProfile", $"Com Port: {_comPort}");
|
||||
LogMessage("ReadProfile", $"Guide Rate: {_guideRate}");
|
||||
LogMessage("ReadProfile", $"Precision: {_precision}");
|
||||
LogMessage("ReadProfile", $"Guiding Style: {_guidingStyle}");
|
||||
}
|
||||
|
||||
private void WriteProfile()
|
||||
|
||||
@@ -123,6 +123,7 @@ namespace Meade.net.UnitTests
|
||||
profileWrapperMock.Verify(x => x.WriteValue(DriverId, "COM Port", profileProperties.ComPort), 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);
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -134,6 +135,7 @@ namespace Meade.net.UnitTests
|
||||
string TraceStateDefault = "false";
|
||||
string GuideRateProfileNameDefault = "10.077939"; //67% of sidereal rate
|
||||
string PrecisionDefault = "Unchanged";
|
||||
string GuidingStyleDefault = "Auto";
|
||||
|
||||
Mock<IProfileWrapper> profileWrapperMock = new Mock<IProfileWrapper>();
|
||||
profileWrapperMock.SetupAllProperties();
|
||||
@@ -147,6 +149,8 @@ namespace Meade.net.UnitTests
|
||||
GuideRateProfileNameDefault)).Returns(GuideRateProfileNameDefault);
|
||||
profileWrapperMock.Setup(x => x.GetValue(DriverId, "Precision", string.Empty, PrecisionDefault))
|
||||
.Returns(PrecisionDefault);
|
||||
profileWrapperMock.Setup(x => x.GetValue(DriverId, "Guiding Style", string.Empty, GuidingStyleDefault))
|
||||
.Returns(GuidingStyleDefault);
|
||||
|
||||
IProfileWrapper profeWrapper = profileWrapperMock.Object;
|
||||
|
||||
@@ -163,6 +167,7 @@ namespace Meade.net.UnitTests
|
||||
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));
|
||||
}
|
||||
|
||||
[TestCase("TCP")]
|
||||
@@ -247,11 +252,17 @@ namespace Meade.net.UnitTests
|
||||
_serialMock.Setup(x => x.ReceiveTerminated("#")).Returns(() => throw new Exception("Testerror"));
|
||||
|
||||
var connectionResult = SharedResources.Connect(deviceId, string.Empty);
|
||||
|
||||
Assert.That(connectionResult.SameDevice, Is.EqualTo(1));
|
||||
Assert.That(SharedResources.ProductName, Is.EqualTo(TelescopeList.LX200CLASSIC));
|
||||
try
|
||||
{
|
||||
|
||||
SharedResources.Disconnect(deviceId, String.Empty);
|
||||
|
||||
Assert.That(connectionResult.SameDevice, Is.EqualTo(1));
|
||||
Assert.That(SharedResources.ProductName, Is.EqualTo(TelescopeList.LX200CLASSIC));
|
||||
}
|
||||
finally
|
||||
{
|
||||
SharedResources.Disconnect(deviceId, String.Empty);
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -291,12 +302,16 @@ namespace Meade.net.UnitTests
|
||||
_serialMock.Setup(x => x.ReceiveTerminated("#")).Returns(() => serialPortReturn);
|
||||
|
||||
var connectionResult = SharedResources.Connect(deviceId, string.Empty);
|
||||
|
||||
Assert.That(connectionResult.SameDevice, Is.EqualTo(1));
|
||||
Assert.That(SharedResources.ProductName, Is.EqualTo(TelescopeList.Autostar497));
|
||||
Assert.That(SharedResources.FirmwareVersion, Is.EqualTo(TelescopeList.Autostar497_43Eg));
|
||||
|
||||
SharedResources.Disconnect(deviceId, String.Empty);
|
||||
try
|
||||
{
|
||||
Assert.That(connectionResult.SameDevice, Is.EqualTo(1));
|
||||
Assert.That(SharedResources.ProductName, Is.EqualTo(TelescopeList.Autostar497));
|
||||
Assert.That(SharedResources.FirmwareVersion, Is.EqualTo(TelescopeList.Autostar497_43Eg));
|
||||
}
|
||||
finally
|
||||
{
|
||||
SharedResources.Disconnect(deviceId, String.Empty);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,5 +7,6 @@ namespace ASCOM.Meade.net
|
||||
public bool TraceLogger { get; set; }
|
||||
public double GuideRateArcSecondsPerSecond { get; set; }
|
||||
public string Precision { get; set; }
|
||||
public string GuidingStyle { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -71,6 +71,16 @@ namespace ASCOM.Meade.net
|
||||
{
|
||||
cboPrecision.SelectedItem = "Unchanged";
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
cboGuidingStyle.SelectedItem = profileProperties.GuidingStyle;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
cboGuidingStyle.SelectedItem = "Auto";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public ProfileProperties GetProfile()
|
||||
@@ -80,7 +90,8 @@ namespace ASCOM.Meade.net
|
||||
TraceLogger = chkTrace.Checked,
|
||||
ComPort = comboBoxComPort.SelectedItem.ToString(),
|
||||
GuideRateArcSecondsPerSecond = double.Parse(txtGuideRate.Text.Trim()),
|
||||
Precision = cboPrecision.SelectedItem.ToString()
|
||||
Precision = cboPrecision.SelectedItem.ToString(),
|
||||
GuidingStyle = cboGuidingStyle.SelectedItem.ToString()
|
||||
};
|
||||
|
||||
return profileProperties;
|
||||
|
||||
Generated
+22
@@ -45,6 +45,8 @@ namespace ASCOM.Meade.net
|
||||
this.lblPercentOfSiderealRate = new System.Windows.Forms.Label();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.cboPrecision = new System.Windows.Forms.ComboBox();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.cboGuidingStyle = new System.Windows.Forms.ComboBox();
|
||||
((System.ComponentModel.ISupportInitialize)(this.picASCOM)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
@@ -133,10 +135,28 @@ namespace ASCOM.Meade.net
|
||||
resources.ApplyResources(this.cboPrecision, "cboPrecision");
|
||||
this.cboPrecision.Name = "cboPrecision";
|
||||
//
|
||||
// label6
|
||||
//
|
||||
resources.ApplyResources(this.label6, "label6");
|
||||
this.label6.Name = "label6";
|
||||
//
|
||||
// cboGuidingStyle
|
||||
//
|
||||
this.cboGuidingStyle.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cboGuidingStyle.FormattingEnabled = true;
|
||||
this.cboGuidingStyle.Items.AddRange(new object[] {
|
||||
resources.GetString("cboGuidingStyle.Items"),
|
||||
resources.GetString("cboGuidingStyle.Items1"),
|
||||
resources.GetString("cboGuidingStyle.Items2")});
|
||||
resources.ApplyResources(this.cboGuidingStyle, "cboGuidingStyle");
|
||||
this.cboGuidingStyle.Name = "cboGuidingStyle";
|
||||
//
|
||||
// SetupDialogForm
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.cboGuidingStyle);
|
||||
this.Controls.Add(this.label6);
|
||||
this.Controls.Add(this.cboPrecision);
|
||||
this.Controls.Add(this.label5);
|
||||
this.Controls.Add(this.lblPercentOfSiderealRate);
|
||||
@@ -178,5 +198,7 @@ namespace ASCOM.Meade.net
|
||||
private Label lblPercentOfSiderealRate;
|
||||
private Label label5;
|
||||
private ComboBox cboPrecision;
|
||||
private Label label6;
|
||||
private ComboBox cboGuidingStyle;
|
||||
}
|
||||
}
|
||||
@@ -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, 225</value>
|
||||
<value>281, 250</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>12</value>
|
||||
<value>14</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, 255</value>
|
||||
<value>281, 280</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>11</value>
|
||||
<value>13</value>
|
||||
</data>
|
||||
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 9</value>
|
||||
@@ -196,7 +196,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label1.ZOrder" xml:space="preserve">
|
||||
<value>10</value>
|
||||
<value>12</value>
|
||||
</data>
|
||||
<data name="picASCOM.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Top, Right</value>
|
||||
@@ -223,7 +223,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>picASCOM.ZOrder" xml:space="preserve">
|
||||
<value>9</value>
|
||||
<value>11</value>
|
||||
</data>
|
||||
<data name="label2.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -250,13 +250,13 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label2.ZOrder" xml:space="preserve">
|
||||
<value>8</value>
|
||||
<value>10</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>77, 136</value>
|
||||
<value>86, 136</value>
|
||||
</data>
|
||||
<data name="chkTrace.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>69, 17</value>
|
||||
@@ -277,10 +277,10 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>chkTrace.ZOrder" xml:space="preserve">
|
||||
<value>7</value>
|
||||
<value>9</value>
|
||||
</data>
|
||||
<data name="comboBoxComPort.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>77, 87</value>
|
||||
<value>86, 87</value>
|
||||
</data>
|
||||
<data name="comboBoxComPort.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>90, 21</value>
|
||||
@@ -298,7 +298,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>comboBoxComPort.ZOrder" xml:space="preserve">
|
||||
<value>6</value>
|
||||
<value>8</value>
|
||||
</data>
|
||||
<data name="label3.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -325,10 +325,10 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label3.ZOrder" xml:space="preserve">
|
||||
<value>5</value>
|
||||
<value>7</value>
|
||||
</data>
|
||||
<data name="txtGuideRate.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>77, 159</value>
|
||||
<value>86, 159</value>
|
||||
</data>
|
||||
<data name="txtGuideRate.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>46, 20</value>
|
||||
@@ -349,13 +349,13 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>txtGuideRate.ZOrder" xml:space="preserve">
|
||||
<value>4</value>
|
||||
<value>6</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>129, 162</value>
|
||||
<value>138, 162</value>
|
||||
</data>
|
||||
<data name="label4.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>122, 13</value>
|
||||
@@ -376,13 +376,13 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label4.ZOrder" xml:space="preserve">
|
||||
<value>3</value>
|
||||
<value>5</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>129, 175</value>
|
||||
<value>138, 175</value>
|
||||
</data>
|
||||
<data name="lblPercentOfSiderealRate.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>105, 13</value>
|
||||
@@ -403,7 +403,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>lblPercentOfSiderealRate.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="label5.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -430,7 +430,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label5.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="cboPrecision.Items" xml:space="preserve">
|
||||
<value>Unchanged</value>
|
||||
@@ -442,7 +442,7 @@
|
||||
<value>High</value>
|
||||
</data>
|
||||
<data name="cboPrecision.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>77, 191</value>
|
||||
<value>86, 191</value>
|
||||
</data>
|
||||
<data name="cboPrecision.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>90, 21</value>
|
||||
@@ -460,6 +460,66 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>cboPrecision.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="label6.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label6.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="label6.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>13, 221</value>
|
||||
</data>
|
||||
<data name="label6.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>67, 13</value>
|
||||
</data>
|
||||
<data name="label6.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>14</value>
|
||||
</data>
|
||||
<data name="label6.Text" xml:space="preserve">
|
||||
<value>Guiding style</value>
|
||||
</data>
|
||||
<data name=">>label6.Name" xml:space="preserve">
|
||||
<value>label6</value>
|
||||
</data>
|
||||
<data name=">>label6.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=">>label6.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label6.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="cboGuidingStyle.Items" xml:space="preserve">
|
||||
<value>Auto</value>
|
||||
</data>
|
||||
<data name="cboGuidingStyle.Items1" xml:space="preserve">
|
||||
<value>Guide rate slew</value>
|
||||
</data>
|
||||
<data name="cboGuidingStyle.Items2" xml:space="preserve">
|
||||
<value>Pulse guiding</value>
|
||||
</data>
|
||||
<data name="cboGuidingStyle.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>86, 218</value>
|
||||
</data>
|
||||
<data name="cboGuidingStyle.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>90, 21</value>
|
||||
</data>
|
||||
<data name="cboGuidingStyle.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>15</value>
|
||||
</data>
|
||||
<data name=">>cboGuidingStyle.Name" xml:space="preserve">
|
||||
<value>cboGuidingStyle</value>
|
||||
</data>
|
||||
<data name=">>cboGuidingStyle.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=">>cboGuidingStyle.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>cboGuidingStyle.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">
|
||||
@@ -469,7 +529,7 @@
|
||||
<value>6, 13</value>
|
||||
</data>
|
||||
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>350, 288</value>
|
||||
<value>350, 313</value>
|
||||
</data>
|
||||
<data name="$this.StartPosition" type="System.Windows.Forms.FormStartPosition, System.Windows.Forms">
|
||||
<value>CenterScreen</value>
|
||||
|
||||
@@ -139,7 +139,8 @@ namespace ASCOM.Meade.net
|
||||
private const string TraceStateProfileName = "Trace Level";
|
||||
private const string GuideRateProfileName = "Guide Rate Arc Seconds Per Second";
|
||||
private const string PrecisionProfileName = "Precision";
|
||||
|
||||
private const string GuidingStyleProfileName = "Guiding Style";
|
||||
|
||||
public static void WriteProfile(ProfileProperties profileProperties)
|
||||
{
|
||||
lock (LockObject)
|
||||
@@ -151,6 +152,7 @@ namespace ASCOM.Meade.net
|
||||
driverProfile.WriteValue(DriverId, ComPortProfileName, profileProperties.ComPort);
|
||||
driverProfile.WriteValue(DriverId, GuideRateProfileName, profileProperties.GuideRateArcSecondsPerSecond.ToString(CultureInfo.InvariantCulture));
|
||||
driverProfile.WriteValue(DriverId, PrecisionProfileName, profileProperties.Precision);
|
||||
driverProfile.WriteValue(DriverId, GuidingStyleProfileName, profileProperties.GuidingStyle);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -159,6 +161,8 @@ namespace ASCOM.Meade.net
|
||||
private const string TraceStateDefault = "false";
|
||||
private const string GuideRateProfileNameDefault = "10.077939"; //67% of sidereal rate
|
||||
private const string PrecisionDefault = "Unchanged";
|
||||
private const string GuidingStyleDefault = "Auto";
|
||||
|
||||
|
||||
public static ProfileProperties ReadProfile()
|
||||
{
|
||||
@@ -172,6 +176,7 @@ namespace ASCOM.Meade.net
|
||||
profileProperties.TraceLogger = Convert.ToBoolean(driverProfile.GetValue(DriverId, TraceStateProfileName, string.Empty, TraceStateDefault));
|
||||
profileProperties.GuideRateArcSecondsPerSecond = double.Parse(driverProfile.GetValue(DriverId, GuideRateProfileName, string.Empty, GuideRateProfileNameDefault), NumberFormatInfo.InvariantInfo);
|
||||
profileProperties.Precision = driverProfile.GetValue(DriverId, PrecisionProfileName, string.Empty, PrecisionDefault);
|
||||
profileProperties.GuidingStyle = driverProfile.GetValue(DriverId, GuidingStyleProfileName, string.Empty, GuidingStyleDefault);
|
||||
}
|
||||
|
||||
return profileProperties;
|
||||
|
||||
Reference in New Issue
Block a user