Changed the initialisation order to avoid issue with ISharedResourcesWrapper being called before it's created.
This commit is contained in:
@@ -74,20 +74,20 @@ namespace ASCOM.Meade.net
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public Telescope()
|
public Telescope()
|
||||||
{
|
{
|
||||||
tl = new TraceLogger("", "Meade.net.Telescope");
|
//todo move this out to IOC
|
||||||
ReadProfile(); // Read device configuration from the ASCOM Profile store
|
|
||||||
|
|
||||||
tl.LogMessage("Telescope", "Starting initialisation");
|
|
||||||
|
|
||||||
IsConnected = false; // Initialise connected to false
|
|
||||||
_utilities = new Util(); //Initialise util object
|
_utilities = new Util(); //Initialise util object
|
||||||
_utilitiesExtra = new Util(); //Initialise util object
|
_utilitiesExtra = new Util(); //Initialise util object
|
||||||
_astroUtilities = new AstroUtils(); // Initialise astro utilities object
|
_astroUtilities = new AstroUtils(); // Initialise astro utilities object
|
||||||
_sharedResourcesWrapper = new SharedResourcesWrapper();
|
_sharedResourcesWrapper = new SharedResourcesWrapper();
|
||||||
|
|
||||||
//TODO: Implement your additional construction here
|
|
||||||
_astroMaths = new AstroMaths();
|
_astroMaths = new AstroMaths();
|
||||||
|
|
||||||
|
tl = new TraceLogger("", "Meade.net.Telescope");
|
||||||
|
tl.LogMessage("Telescope", "Starting initialisation");
|
||||||
|
|
||||||
|
ReadProfile(); // Read device configuration from the ASCOM Profile store
|
||||||
|
|
||||||
|
IsConnected = false; // Initialise connected to false
|
||||||
|
|
||||||
tl.LogMessage("Telescope", "Completed initialisation");
|
tl.LogMessage("Telescope", "Completed initialisation");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,8 @@
|
|||||||
#define Focuser
|
#define Focuser
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Text;
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
using ASCOM;
|
|
||||||
using ASCOM.Astrometry;
|
|
||||||
using ASCOM.Astrometry.AstroUtils;
|
|
||||||
using ASCOM.Utilities;
|
using ASCOM.Utilities;
|
||||||
using ASCOM.DeviceInterface;
|
using ASCOM.DeviceInterface;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
@@ -71,14 +65,15 @@ namespace ASCOM.Meade.net
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public Focuser()
|
public Focuser()
|
||||||
{
|
{
|
||||||
tl = new TraceLogger("", "Meade.net.focusser");
|
//todo move this out to IOC
|
||||||
ReadProfile(); // Read device configuration from the ASCOM Profile store
|
|
||||||
|
|
||||||
tl.LogMessage("Focuser", "Starting initialisation");
|
|
||||||
|
|
||||||
IsConnected = false; // Initialise connected to false
|
|
||||||
_utilities = new Util(); //Initialise util object
|
_utilities = new Util(); //Initialise util object
|
||||||
_sharedResourcesWrapper = new SharedResourcesWrapper();
|
_sharedResourcesWrapper = new SharedResourcesWrapper();
|
||||||
|
tl = new TraceLogger("", "Meade.net.focusser");
|
||||||
|
|
||||||
|
tl.LogMessage("Focuser", "Starting initialisation");
|
||||||
|
ReadProfile(); // Read device configuration from the ASCOM Profile store
|
||||||
|
|
||||||
|
IsConnected = false; // Initialise connected to false
|
||||||
|
|
||||||
tl.LogMessage("Focuser", "Completed initialisation");
|
tl.LogMessage("Focuser", "Completed initialisation");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user