Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter-Simpson committed Jan 14, 2022
2 parents 5d1738a + e2f765e commit 1f175cb
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 26 deletions.
24 changes: 13 additions & 11 deletions ASCOM.Utilities/ASCOM Diagnostics/DiagnosticsForm.Designer.vb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 23 additions & 15 deletions ASCOM.Utilities/ASCOM Diagnostics/DiagnosticsForm.vb
Original file line number Diff line number Diff line change
Expand Up @@ -194,11 +194,6 @@ Public Class DiagnosticsForm
Console.WriteLine("Console created")
End If

AstroUtil = New AstroUtils.AstroUtils
Nov3 = New NOVAS.NOVAS3
Nov31 = New NOVAS.NOVAS31
AscomUtil = New Util
transform = New Astrometry.Transform.Transform()
Me.BringToFront()
Me.KeyPreview = True ' Ensure that key press events are sent to the form so that the key press event handler can respond to them

Expand All @@ -221,6 +216,12 @@ Public Class DiagnosticsForm
.Enabled = True
}

transform = New Astrometry.Transform.Transform() ' Create a new Transform component for this run
AstroUtil = New AstroUtils.AstroUtils
Nov3 = New NOVAS.NOVAS3
Nov31 = New NOVAS.NOVAS31
AscomUtil = New Util

btnExit.Enabled = False ' Disable buttons during run
btnViewLastLog.Enabled = False
btnRunDiagnostics.Enabled = False
Expand Down Expand Up @@ -545,6 +546,22 @@ Public Class DiagnosticsForm
TL.BlankLine()
End If

Try
AstroUtil.Dispose()
TL.LogMessage("AstroUtilTests", "AstroUtils Disposed OK")
Catch ex As Exception
LogException("AstroUtilTests", "AstroUtils: " & ex.ToString)
End Try
AstroUtil = Nothing

Try
transform.Dispose()
TL.LogMessage("Diagnostics", "Transform Disposed OK")
Catch ex As Exception
LogException("Diagnostics", "Transform: " & ex.ToString)
End Try
transform = Nothing

TL.BlankLine()
TL.LogMessage("Diagnostics", SuccessMessage)
TL.Enabled = False
Expand Down Expand Up @@ -656,7 +673,7 @@ Public Class DiagnosticsForm
'Eo06a tests
eo = SOFA.Eo06a(2400000.5, 53736.0)

CompareDouble("SOFATests", "Eo06a-eo", eo, -0.0013328823719418337, 0.000000000000001)
CompareDouble("SOFATests", "Eo06a-eo", eo, -0.0013328823719418338, 0.000000000000001)

'Atic13 tests
ri = 2.7101215729690389
Expand Down Expand Up @@ -3922,8 +3939,6 @@ Public Class DiagnosticsForm
TransformTest2000("Polaris", "02:31:51.263", "89:15:50.68", TOLERANCE_E5, TOLERANCE_E4)
TransformTest2000("Arcturus", "14:15:38.943", "19:10:37.93", TOLERANCE_E5, TOLERANCE_E4)

transform.Dispose()

TL.BlankLine()
End Sub

Expand Down Expand Up @@ -8401,13 +8416,6 @@ Public Class DiagnosticsForm

TL.BlankLine()

Try
AstroUtil.Dispose()
TL.LogMessage("AstroUtilTests", "ASCOM.Astrometry.AstroUtils.AstroUtils, Disposed OK")
Catch ex As Exception
LogException("AstroUtilTests", "ASCOM.Astrometry.AstroUtils.AstroUtils: " & ex.ToString)
End Try
AstroUtil = Nothing
TL.LogMessage("AstroUtilTests", "Finished")
TL.BlankLine()

Expand Down

0 comments on commit 1f175cb

Please sign in to comment.