Beispiel #1
0
        /// <summary>
        /// Read the device configuration from the ASCOM Profile store
        /// </summary>
        internal void ReadProfile()
        {
            DomeSettings settings = DomeSettings.FromProfile();

            Globals.DomeAzimuthAdjustment       = settings.AzimuthAdjustment;
            Globals.UsePOTHDomeSlaveCalculation = settings.UsePOTHDomeSlaveCalculation;
            _logger.Enabled = settings.IsLoggingEnabled;
        }
Beispiel #2
0
        private static void SaveDomeSettings()
        {
            DomeSettings domeSettings = DomeSettings.FromProfile();

            domeSettings.AzimuthAdjustment           = Globals.DomeAzimuthAdjustment;
            domeSettings.UsePOTHDomeSlaveCalculation = Globals.UsePOTHDomeSlaveCalculation;
            domeSettings.ToProfile();
        }
        private void SaveDomeSettings()
        {
            // Read the current settings and update them with the changes
            // to preserve the logging flag.

            DomeSettings settings = DomeSettings.FromProfile();

            settings.DomeID     = DomeManager.DomeID;
            settings.DomeLayout = Globals.DomeLayout;
            settings.ToProfile();
        }
        private static void LoadDeviceSettings()
        {
            TelescopeSettings scopeSettings = TelescopeSettings.FromProfile();

            TelescopeManager.SetTelescopeID(scopeSettings.TelescopeID);

            DomeSettings domeSettings = DomeSettings.FromProfile();

            DomeManager.SetDomeID(domeSettings.DomeID);
            Globals.DomeLayout                  = domeSettings.DomeLayout;
            Globals.DomeAzimuthAdjustment       = domeSettings.AzimuthAdjustment;
            Globals.UsePOTHDomeSlaveCalculation = domeSettings.UsePOTHDomeSlaveCalculation;
            Globals.FindDomeHomeAtStartup       = domeSettings.FindDomeHomeAtStartup;
            FocuserSettings focuserSettings = FocuserSettings.FromProfile();

            FocuserManager.SetFocuserID(focuserSettings.FocuserID);
            Globals.FocuserTemperatureOffset = focuserSettings.TemperatureOffset;
        }