DomeImpl(ASCOM.Skybadger.Properties.Settings config) { this.config = config; domePort = new I2CSerialComms( config, (int) config.DomeCommPort ); obboPort = new I2CSerialComms( config, (int) config.ObboCommPort ); numPorts = 2; logger = new TraceLogger(); // Create a timer with a two second interval. aTimer = new System.Timers.Timer(1000); // Hook up the Elapsed event for the timer. aTimer.Elapsed += OnTimedEvent; aTimer.Enabled = true; azimuth = config.SlitAzimuth; altitude = config.SlitAltitude; parkAzimuth = config.ParkPosition; julianDateSeconds = System.DateTime.Now; azimuthTarget = azimuth; altitudeTarget = altitude; slotAltitudeMin = 0; slotAltitudeMax = 100; bool bConnected = false; ConnectionState eConnected = ConnectionState.NOT_CONNECTED; }
/// <summary> /// Initializes a new instance of the <see cref="MattsDome"/> class. /// Must be public for COM registration. /// </summary> public Dome() { Slaved = false; Get_values(); TicksPerDegree = Properties.Settings.Default.TicksPerDomeRotation / 360; log_window_enabled = Properties.Settings.Default.LogWindowEnabled; trace = new ASCOM.Utilities.TraceLogger(); }