Esempio n. 1
0
 public void sendDataToPlot(string readData)
 {
     dataToPlot.Append(readData);
     if (statusOfPlot)
     {
         SetStatusOfPlot(false);
         Plots.setData(dataToPlot);
         dataToPlot = new StringBuilder();
     }
 }
Esempio n. 2
0
        private void RadioButton_ClickPlots(object sender, RoutedEventArgs e)
        {
            if (JustChecked)
            {
                JustChecked = false;
                e.Handled   = true;
                return;
            }
            RadioButton s = (RadioButton)sender;

            if (s.IsChecked == true)
            {
                if (s.GroupName == "AccX")
                {
                    AxisEnables[0] = false;
                }
                else if (s.GroupName == "AccY")
                {
                    AxisEnables[1] = false;
                }
                else if (s.GroupName == "AccZ")
                {
                    AxisEnables[2] = false;
                }
                else if (s.GroupName == "GyrX")
                {
                    AxisEnables[3] = false;
                }
                else if (s.GroupName == "GyrY")
                {
                    AxisEnables[4] = false;
                }
                else if (s.GroupName == "GyrZ")
                {
                    AxisEnables[5] = false;
                }
                else if (s.GroupName == "Roll")
                {
                    AxisEnables[6] = false;
                }
                else if (s.GroupName == "Pitch")
                {
                    AxisEnables[7] = false;
                }
                Plots.setAxisEnables(AxisEnables);
                s.IsChecked = false;
            }
        }
Esempio n. 3
0
        public Menu()
        {
            windowPort.Visibility         = Visibility.Hidden;
            windowCubeControll.Visibility = Visibility.Hidden;

            InitializeComponent();

            plot = new Plots(plt_sensor_1, plt_sensor_2, plt_sensor_3);
            plot.CreatePlots();

            lbl_Time.Content = DateTime.Now.ToShortTimeString();

            _timer.Interval = 60000;
            _timer.Elapsed += UpdateClock;
            _timer.Enabled  = true;
        }
Esempio n. 4
0
        private void RadioButton_CheckedPlots(object sender, RoutedEventArgs e)
        {
            RadioButton s = (RadioButton)sender;

            if (s.GroupName == "AccX")
            {
                AxisEnables[0] = true;
            }
            else if (s.GroupName == "AccY")
            {
                AxisEnables[1] = true;
            }
            else if (s.GroupName == "AccZ")
            {
                AxisEnables[2] = true;
            }
            else if (s.GroupName == "GyrX")
            {
                AxisEnables[3] = true;
            }
            else if (s.GroupName == "GyrY")
            {
                AxisEnables[4] = true;
            }
            else if (s.GroupName == "GyrZ")
            {
                AxisEnables[5] = true;
            }
            else if (s.GroupName == "Roll")
            {
                AxisEnables[6] = true;
            }
            else if (s.GroupName == "Pitch")
            {
                AxisEnables[7] = true;
            }
            Plots.setAxisEnables(AxisEnables);

            JustChecked = true;
        }