From 0afb80bd706e2d10174ad8b3b10033c2952c33a0 Mon Sep 17 00:00:00 2001 From: Colin Dawson Date: Sun, 1 Dec 2024 22:42:19 +0000 Subject: [PATCH] Fixed problem where the telescope area was in mm when it should be mm squared. And the driver was incorrect by a factor of 1000. --- Meade.net.Telescope.UnitTests/TelescopeUnitTests.cs | 4 +++- Meade.net.Telescope/Telescope.cs | 2 +- Meade.net/SetupDialogForm.cs | 5 +++++ Meade.net/SetupDialogForm.designer.cs | 1 + Meade.net/SetupDialogForm.resx | 6 +++--- 5 files changed, 13 insertions(+), 5 deletions(-) diff --git a/Meade.net.Telescope.UnitTests/TelescopeUnitTests.cs b/Meade.net.Telescope.UnitTests/TelescopeUnitTests.cs index b19dda8..5da6cd2 100644 --- a/Meade.net.Telescope.UnitTests/TelescopeUnitTests.cs +++ b/Meade.net.Telescope.UnitTests/TelescopeUnitTests.cs @@ -845,9 +845,11 @@ namespace Meade.net.Telescope.UnitTests [Test] public void ApertureArea_Get_ReturnsExpectedResult() { + _profileProperties.ApertureArea = 130674; + var result = _telescope.ApertureArea; - Assert.That(result, Is.EqualTo(_profileProperties.ApertureArea / 1000)); + Assert.That(result, Is.EqualTo(_profileProperties.ApertureArea / (1000*1000))); } [Test] diff --git a/Meade.net.Telescope/Telescope.cs b/Meade.net.Telescope/Telescope.cs index af45199..ae71f22 100644 --- a/Meade.net.Telescope/Telescope.cs +++ b/Meade.net.Telescope/Telescope.cs @@ -1355,7 +1355,7 @@ namespace ASCOM.Meade.net { get { - var apertureArea = _profileProperties.ApertureArea / 1000; + var apertureArea = _profileProperties.ApertureArea / (1000*1000); LogMessage("ApertureArea Get", $"{apertureArea}"); return apertureArea; } diff --git a/Meade.net/SetupDialogForm.cs b/Meade.net/SetupDialogForm.cs index d41d3f9..cee869f 100644 --- a/Meade.net/SetupDialogForm.cs +++ b/Meade.net/SetupDialogForm.cs @@ -388,6 +388,11 @@ namespace ASCOM.Meade.net Verb = "open" }); } + + private void label29_Click(object sender, EventArgs e) + { + + } } } diff --git a/Meade.net/SetupDialogForm.designer.cs b/Meade.net/SetupDialogForm.designer.cs index 182c198..b41ea01 100644 --- a/Meade.net/SetupDialogForm.designer.cs +++ b/Meade.net/SetupDialogForm.designer.cs @@ -434,6 +434,7 @@ namespace ASCOM.Meade.net // resources.ApplyResources(this.label29, "label29"); this.label29.Name = "label29"; + this.label29.Click += new System.EventHandler(this.label29_Click); // // txtApertureArea // diff --git a/Meade.net/SetupDialogForm.resx b/Meade.net/SetupDialogForm.resx index c64acf9..d432837 100644 --- a/Meade.net/SetupDialogForm.resx +++ b/Meade.net/SetupDialogForm.resx @@ -1579,13 +1579,13 @@ 494, 139 - 23, 13 + 26, 13 56 - mm + mm² label29 @@ -1678,7 +1678,7 @@ True - 25 + 232 6, 13