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