Пример #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="cam85m_v01"/> class.
 /// Must be public for COM registration.
 /// </summary>
 public Camera()
 {
     // Read device configuration from the ASCOM Profile store
     ReadProfile();
     //Init debug logger
     tl = new TraceLogger("", "cam85m_v01");
     tl.Enabled = traceState;
     tl.LogMessage("Camera", "Starting initialisation");
     // Initialise connected to false
     cameraConnectedState = false;
     //Initialise util object
     utilities = new Util();
     // Initialise astro utilities object
     astroUtilities = new AstroUtils();
     //New form for gain/offset settings
     settingsForm = new camSettings();
     settingsForm.gain = gainState;
     settingsForm.offset = offsetState;
     settingsForm.baudrate = baudrateState;
     settingsForm.onTop = onTopState;
     settingsForm.slowCoolingEnabled = slowCoolingEnabledState;
     settingsForm.slowCoolingSpeed = slowCoolingSpeedState;
     if (!coolerEnabledState) settingsForm.tecStatus = "disabled";
     tec = new TECControl(coolerComPortState, traceState);
     slowCoolingTimer = new System.Timers.Timer(60000);
     slowCoolingTimer.Enabled = false;
     slowCoolingTimer.Elapsed += slowCoolingTimerTick;
     tl.LogMessage("Camera", "Completed initialisation");
 }