Beispiel #1
0
        public void Park()
        {
            //Log enter
            Logging.AddLog(MethodBase.GetCurrentMethod().Name + " enter", LogLevel.Trace);


            //if device present at all and its ID is set
            if (Enabled && DRIVER_NAME != "" && objTelescope != null)
            {
                try
                {
                    objTelescope.Park();
                    Logging.AddLog("Parking scope", LogLevel.Activity);
                }
                catch (Exception ex)
                {
                    Logging.AddLog("Couldn't move to Park status", LogLevel.Important, Highlight.Error);
                    Logging.AddLog(MethodBase.GetCurrentMethod().Name + " error! [" + ex.ToString() + "]", LogLevel.Debug, Highlight.Error);
                }
            }
            else
            {
                //Print if somebody try to connect if device isn't presetn. Mostly for debug
                Logging.AddLog("Telescope is not set. Couldn't set Park status", LogLevel.Debug, Highlight.Error);
            }

            Logging.AddLog(System.Reflection.MethodBase.GetCurrentMethod().Name + ": " + "void", LogLevel.Trace);
        }
        private void parkBtn_Click(object sender, EventArgs e)
        {
            try
            {
                driver.Park();
                parkBtn.Enabled          = false;
                unparkBtn.Enabled        = true;
                setParkBtn.Enabled       = false;
                startTrackBtn.Enabled    = false;
                stopTrackBtn.Enabled     = false;
                guideWestButton.Enabled  = false;
                guideEastButton.Enabled  = false;
                guideNorthButton.Enabled = false;
                guideSouthButton.Enabled = false;

                SlewButton.Enabled  = false;
                AbortButton.Enabled = false;

                moveEastButton.Enabled  = false;
                moveWestButton.Enabled  = false;
                moveNorthButton.Enabled = false;
                moveSouthButton.Enabled = false;
                moveStopButton.Enabled  = false;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Beispiel #3
0
        // another test line of code

        public void Park()
        {
            CheckConnected();
            if (Platform.IsTracking)
            {
                throw new InvalidOperationException("cannot Park when platform is tracking");
            }
            m_mount.Park();
        }