// // Constructor - Must be public for COM registration! // public Telescope() { m_AxisRates = new AxisRates[3]; m_AxisRates[0] = new AxisRates(TelescopeAxes.axisPrimary); m_AxisRates[1] = new AxisRates(TelescopeAxes.axisSecondary); m_AxisRates[2] = new AxisRates(TelescopeAxes.axisTertiary); m_TrackingRates = new TrackingRates(); profile.DeviceType = "Telescope"; try { this.comPort = profile.GetValue(ASCOM.Arduino.Telescope.s_csDriverID, "ComPort"); } catch { this.comPort = null; } SerialConnection = new ASCOM.Utilities.Serial(); SerialConnection.PortName = this.comPort; SerialConnection.StopBits = SerialStopBits.One; SerialConnection.Parity = SerialParity.None; SerialConnection.Speed = SerialSpeed.ps9600; }
internal string GetString(string name) { string ret = null; try { ret = m_profile.GetValue(m_driverId, name); } catch (Exception ex) { Log.Write(String.Format("config: GetValue raised an exception: {0}\n", ex.ToString())); } return(ret); }
public DomeSetupDialogForm() { InitializeComponent(); wisedome.ReadProfile(); checkBoxAutoCalibrate.Checked = wisedome._autoCalibrate; checkBoxSyncVent.Checked = wisedome.SyncVentWithShutter; textBoxShutterIpAddress.Text = wisedome.wisedomeshutter._ipAddress; textBoxShutterHighestValue.Text = wisedome.wisedomeshutter._highestValue.ToString(); textBoxShutterLowestValue.Text = wisedome.wisedomeshutter._lowestValue.ToString(); checkBoxShutterUseWebClient.Checked = wisedome.wisedomeshutter.ShutterWebClientEnabled; using (ASCOM.Utilities.Profile driverProfile = new ASCOM.Utilities.Profile()) { driverProfile.DeviceType = "Telescope"; minimalStep = Convert.ToDouble(driverProfile.GetValue(Const.wiseTelescopeDriverID, Const.ProfileName.Dome_MinimalTrackingMovement, string.Empty, "2.0")); textBoxMinimalStep.Text = minimalStep.ToString(); } }