Пример #1
0
        List<string> selectedKeys = new List<string>(); // Selected Parameters to display

        #endregion Fields

        #region Constructors

        /// <summary>
        /// Initialises the Graphcontrol 
        /// 
        /// </summary>
        /// <param name="core"></param>
        public PropertygraphControl(GroundControlCore.GroundControlCore core)
        {
            InitializeComponent();
            this.comboBox1.Items.Clear();

            List<UAVSingleParameter> uavData = MonitoredDictionary<string, UAVSingleParameter>.NormaliseDictionary(core.currentUAV.uavData);

            foreach (UAVSingleParameter param in uavData)
            {
                comboBox1.Items.Add(param.GetStringPath());
            }

            this.core = core;
               myPane = zedGraphControl1.GraphPane;

            // Set the titles and axis labels
            myPane.Title.Text = "Live Data";
            myPane.XAxis.Title.Text = "Time";
            myPane.YAxis.Title.Text = "Values";
            myPane.XAxis.Type = AxisType.Date;
            myPane.YAxis.Scale.MaxAuto = true;
            myPane.XAxis.Scale.MaxAuto = true;

            zedGraphControl1.IsAutoScrollRange = true;
            zedGraphControl1.IsEnableWheelZoom = true;
            zedGraphControl1.IsEnableHPan = true;
            myPane.Legend.IsVisible = true;
        }
Пример #2
0
 public EFISViewer(GroundControlCore.GroundControlCore uAVBase)
 {
     // TODO: Complete member initialization
     this.mycore = uAVBase;
     this.uAVBase = uAVBase.currentUAV;
     InitializeComponent();
 }
Пример #3
0
 public PropertyWindow(GroundControlCore.GroundControlCore core)
 {
     InitializeComponent();
     this.core = core;
     btn_all_Click(null,null);
     propertyGrid.SelectedObject = new DictionaryPropertyGridAdapter(core.currentUAV.uavData,selectedProperties);
 }
Пример #4
0
 public UAVOSOptionsFrm(GroundControlCore.GroundControlCore core)
 {
     InitializeComponent();
     RemoteDevice device = new RemoteDevice(ConfigurationSettings.AppSettings["Remoteip"],ConfigurationSettings.AppSettings["RemoteUsername"],ConfigurationSettings.AppSettings["RemotePassword"]);
     this.device = device;
     this.core = core;
     UpdateSettingsList(core);
 }
Пример #5
0
 public InstrumentPanel(GroundControlCore.GroundControlCore mycore)
 {
     InitializeComponent();
     this.mycore = mycore;
       //  mycore.currentUAV.DataArrived += new UAVCommons.UAVBase.DataArrivedHandler(currentUAV_DataArrived);
       //  mycore.currentUAV.uavData.ValueChanged += new UAVCommons.MonitoredDictionary<string, UAVCommons.UAVParameter>.ValueChangedHandler(uavData_ValueChanged);
     LoadDatafromAHRS();
 }
Пример #6
0
        public GeoView(GroundControlCore.GroundControlCore core)
        {
            this.core = core;
            core.currentUAV.DataArrived += new UAVCommons.UAVBase.DataArrivedHandler(MapView_ValueChanged);
                core.currentUAV.DataArrived += new UAVCommons.UAVBase.DataArrivedHandler(currentUAV_DataArrived);

            InitializeComponent();
        }
Пример #7
0
        public ParameterControl(GroundControlCore.GroundControlCore core, UAVCommons.UAVSingleParameter parameter)
            : base()
        {
            InitializeComponent();
            this.core = core;
            core.currentUAV.uavData.NewValue += new UAVCommons.MonitoredDictionary<string, UAVCommons.UAVSingleParameter>.NewValueHandler(uavData_NewValue);
            if (parameter != null) selectedParameter = parameter;

            Update_Combobox();
            if (parameter != null)
            {
                cb_Parameter.SelectedItem = parameter.GetStringPath();
                    }
            btn_output.ForeColor = Color.Blue;
            btn_output.Text = "Input";
            output = false;

            if (parameter != null)
            {
                ValueBar.Step = 1;
                valueTracker.TickFrequency = 10;
                valueTracker.TickStyle = TickStyle.Both;
                valueTracker.Maximum = Convert.ToDecimal(parameter.Max);
                valueTracker.Minimum = Convert.ToDecimal(parameter.Min);
                ValueBar.Minimum = valueTracker.Minimum;
                ValueBar.Maximum = valueTracker.Maximum;

                if (parameter.Max != null) tb_max.Text = parameter.Max.ToString();
                if (parameter.Min != null) tb_min.Text = parameter.Min.ToString();
                if ((parameter.Value != null) && (parameter.Value.ToString() != ""))
                {
                    if ((parameter.DoubleValue >= parameter.MinDoubleValue) &&
                        (parameter.DoubleValue <= parameter.MaxDoubleValue))
                    {

                    valueTracker.Value = Convert.ToDecimal(parameter.Value);
                    ValueBar.Value = Convert.ToDecimal(valueTracker.Value);
                    lbl_value.Text = parameter.Value.ToString();
                }
                else
                {
                    lbl_value.Text = "Value out of Bounds " + parameter.Value.ToString();
                }
            }

            }
            else {
                ValueBar.Minimum = 0;
                valueTracker.Minimum = 0;
                ValueBar.Maximum = 100;
                valueTracker.Maximum = 100;
                ValueBar.Value = 50;
                valueTracker.Value = 50;

                lbl_value.Text = "50";
            }
            this.valueTracker.Factor = 0.0001m;
        }
Пример #8
0
 public LogViewer(GroundControlCore.GroundControlCore core,string LogName)
 {
     InitializeComponent();
     this.core = core;
     this.LogName = LogName;
     core.currentUAV.NewLogEntry += new UAVCommons.UAVBase.NewLogEntryHandler(currentUAV_NewLogEntry);
     logbox.Items.Clear();
     core.currentUAV.CommunicationStatusChanged += new UAVCommons.UAVBase.CommunicationStatusHandler(currentUAV_CommunicationStatusChanged);
 }
Пример #9
0
 /// <summary>
 /// Fill list with all properties
 /// </summary>
 /// <param name="core"></param>
 public PropertyChooser(GroundControlCore.GroundControlCore core,List<string> defaultKeys)
 {
     InitializeComponent();
        // checkedListBox1.Items = core.currentUAV.uavData.Values;
     CheckedParameters.Items.Clear();
     choosenKeys = defaultKeys;
     List<UAVSingleParameter> uavData = MonitoredDictionary<string, UAVSingleParameter>.NormaliseDictionary(core.currentUAV.uavData);
     foreach (UAVSingleParameter param in uavData)
     {
         bool checkeditem = false;
         if (defaultKeys.Contains(param.Name)) checkeditem = true;
         CheckedParameters.Items.Add(param.Name,checkeditem);
     }
 }
Пример #10
0
        /// <summary>
        /// Initialise Object
        /// </summary>
        /// <param name="core"></param>
        public ConnectionsPanel(GroundControlCore.GroundControlCore core)
        {
            InitializeComponent();
            this.core = core;
            cb_Source.SelectedText = "Bodenstation";
            foreach (UAVCommons.CommunicationEndpoint endpoint in core.currentUAV.knownEndpoints)
            {
                endpoint.LatencyUpdated += new UAVCommons.CommunicationEndpoint.LatencyHandler(endpoint_LatencyUpdated);

            }

            UpdateGrid(core.currentUAV.knownEndpoints);

            core.currentUAV.CommunicationStatusChanged += new UAVCommons.UAVBase.CommunicationStatusHandler(currentUAV_CommunicationStatusChanged);
        }
Пример #11
0
        public MapView(GroundControlCore.GroundControlCore core)
            : base(core)
        {
            InitializeComponent();
            gMapControl1.RoutesEnabled = true;
            overlay = new GMap.NET.WindowsForms.GMapOverlay(gMapControl1, "Waypoints");
            this.gMapControl1.Overlays.Add(overlay);
            UAVOverlay = new GMap.NET.WindowsForms.GMapOverlay(gMapControl1, "UAV");
            this.gMapControl1.Overlays.Add(UAVOverlay);

            gMapControl1.HoldInvalidation = false;
            gMapControl1.ZoomAndCenterRoutes(null);
            gMapControl1.ZoomAndCenterMarkers(null);
            gMapControl1.CanDragMap = true;
            gMapControl1.DragButton = System.Windows.Forms.MouseButtons.Left;
            gMapControl1.SetCurrentPositionByKeywords("Leonding");
            gMapControl1.Zoom = 17;
            overlay.Markers.CollectionChanged += new GMap.NET.ObjectModel.NotifyCollectionChangedEventHandler(Markers_CollectionChanged);
        }
Пример #12
0
 private void UpdateSettingsList(GroundControlCore.GroundControlCore core)
 {
     listBox1.Items.Clear();
     UAVCommons.Commands.FindFilesCommand findfiles = (UAVCommons.Commands.FindFilesCommand)core.currentUAV.SendCommand(new UAVCommons.Commands.FindFilesCommand("", "*.uav"));
     if (findfiles.files != null)
     {
         listBox1.Items.AddRange(findfiles.files);
     }
 }
Пример #13
0
 /// <summary>
 /// Initialisiere neues OBJ
 /// </summary>
 /// <param name="core"></param>
 public ControlPanel(GroundControlCore.GroundControlCore core)
 {
     this.core = core;
     InitializeComponent();
     UpdateActiveParameters();
 }
Пример #14
0
 public WaypointList(GroundControlCore.GroundControlCore core)
 {
     InitializeComponent();
 }