public RAAxisController(ITelescopeV3 telescope)
 {
     _previousSlew = 0;
     _slewRate = 0;
     _telescope = telescope;
     _tracking = false;
     _slewing = false;
 }
Example #2
0
 public DecAxisController(ITelescopeV3 telescope)
 {
     _previousSlew = 0;
     _slewRate     = 0;
     _telescope    = telescope;
     _tracking     = false;
     _slewing      = false;
 }
        private void OK_Button_Click(System.Object sender, System.EventArgs e)         // OK button event handler
        {
            if ((this._oat != null) && (this._oat.Connected))
            {
                this._oat.Connected = false;
                this._oat           = null;
            }

            // Persist new values of user settings to the ASCOM profile
            // Update the state variables with results from the dialogue
            _profile.ComPort  = (string)ComboBoxComPort.SelectedItem;
            _profile.BaudRate = Convert.ToInt64(comboBoxBaudRate.SelectedItem);
            this.DialogResult = System.Windows.Forms.DialogResult.OK;
            this.Close();
        }
 private void Cancel_Button_Click(System.Object sender, System.EventArgs e)         // Cancel button event handler
 {
     try
     {
         if ((this._oat != null) && (this._oat.Connected))
         {
             this._oat.Connected = false;
             this._oat           = null;
         }
     }
     catch (Exception ex)
     {
         this._oat = null;
     }
     this.DialogResult = System.Windows.Forms.DialogResult.Cancel;
     this.Close();
 }
        public SetupDialogForm(ProfileData profile, ITelescopeV3 telescope, Action <string> logger)
        {
            _logger  = logger;
            _profile = profile;
            _oat     = telescope;
            InitializeComponent();

            // Focuser driver passes in null for telescope
            btnConnect.Visible = (_oat != null);

            btnUnparkDEC.Visible  = false;
            btnParkDEC.Visible    = false;
            btnAutoHomeRA.Visible = false;

            SlewRate       = 4;
            lblStatus.Text = "Disconnected";

            Text          = $"OpenAstroTracker Setup - {Version}";
            scopeFeatures = new HashSet <string>();

            EnableAccordingToConnectState();
        }
Example #6
0
 public TelescopeV3Proxy(ITelescopeV3 impl)
 {
     _impl = impl;
 }
Example #7
0
 public TelescopeV3Proxy(ITelescopeV3 impl)
 {
     _impl = impl;
 }