Esempio n. 1
0
 public ExperimentInterface()
 {
     InitializeComponent();
     display_emg_data = checkBox1.Checked;
     display_subject_position_data = checkBox2.Checked;
     window_size = Convert.ToInt32(textBox16.Text);
     //Set combobox defaults
     comboBox1.SelectedIndex = 2;
     comboBox2.SelectedIndex = 3;
     comboBox9.SelectedIndex = 0;
     comboBox5.SelectedIndex = 0;
     comboBox8.SelectedIndex = 0;
     //Get the current sensors
     trigno_sensor_biceps       = Convert.ToInt32(comboBox1.SelectedItem.ToString());
     trigno_sensor_triceps      = Convert.ToInt32(comboBox2.SelectedItem.ToString());
     motion_tracking_controller = new ElbowMotionTrackingController(window_size, trigno_sensor_biceps, trigno_sensor_triceps, this);
     stop_watch = new Stopwatch();
     CheckControlSettings();
     subject_data_loaded = 0;
 }
Esempio n. 2
0
        public WearMEBraceController(Device _epos, ElbowMotionTrackingController _motion_tracking_controller)
        {
            epos = _epos;
            motion_tracking_controller                = _motion_tracking_controller;
            brace_positions                           = new List <double>();
            brace_position_thread                     = new BracePositionThread();
            brace_position_worker                     = new BackgroundWorker();
            brace_position_worker.DoWork             += new DoWorkEventHandler(BracePositionWorker_DoWork);
            brace_position_worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(BracePositionWorker_RunWorkerCompleted);
            brace_position_thread.epos                = _epos;
            brace_command_thread                      = new BraceCommandThread();
            brace_command_worker                      = new BackgroundWorker();
            brace_command_worker.DoWork              += new DoWorkEventHandler(BraceCommandWorker_DoWork);
            brace_command_worker.RunWorkerCompleted  += new RunWorkerCompletedEventHandler(BraceCommandWorker_RunWorkerCompleted);
            brace_command_thread.epos                 = _epos;
            brace_command_thread.command              = 1; //position
            stop_watch  = new Stopwatch();
            stop_watch2 = new Stopwatch();
            gear_ratio  = 713;

            //initialize background workers/threads
        }