Ejemplo n.º 1
0
 private void nudSpeed_ValueChanged(object sender, EventArgs e)
 {
     if (btnStartTreadmill.Text == "Stop Treadmill")
     {
         SendMCECommand.SetTreadmillSpeed((float)nudSpeed.Value);
     }
 }
Ejemplo n.º 2
0
 private void StartAll()
 {
     if (btnStartTreadmill.Text == "Start Treadmill")
     {
         if (plotFeet != null)
         {
             plotFeet.Dispose();
         }
         //SendMCECommand.Calibrate();
         //SendMCECommand.SetTreadmillSpeed((float)nudSpeed.Value);
         //feetSound.Enabled = true;
         btnStartTreadmill.Text = "Stop Treadmill";
         if (chkLink.Checked == true)
         {
             if (chkDelayStart.Checked == true)
             {
                 timer1.Enabled = true;
             }
             else
             {
                 StartData();
             }
         }
     }
     else
     {
         SendMCECommand.SetTreadmillSpeed(0.0F);
         btnStartTreadmill.Text = "Start Treadmill";
         StopData();
         timer1.Enabled = false;
         //asymmetryAnalyser.Enabled = false;
         //feetSound.Enabled = false;
     }
 }
Ejemplo n.º 3
0
 private void StartAll()
 {
     if (btnStartTreadmill.Text == "Start Treadmill")
     {
         btnStartTreadmill.Text = "Stop Treadmill";
         if (chkLink.Checked == true)
         {
             if (chkDelayStart.Checked == true)
             {
                 timer1.Enabled = true;
             }
             else
             {
                 StartData();
             }
         }
     }
     else
     {
         SendMCECommand.SetTreadmillSpeed(0.0F);
         btnStartTreadmill.Text = "Start Treadmill";
         StopData();
         timer1.Enabled = false;
     }
 }
Ejemplo n.º 4
0
        private void StartData()
        {
            SendMCECommand.Calibrate();
            TestSubject person = new TestSubject("Me", "111", "Male", 20, markerHeightCal);

            dataCollection = new TightropeData(person, "Test1", 1);
            sound          = new ALSoundEnvironment(person);
            SendMCECommand.SetTreadmillSpeed((float)nudSpeed.Value);
        }
Ejemplo n.º 5
0
 private void StartData()
 {
     SendMCECommand.Calibrate();
     file           = new StreamWriter(@"D:/Test/tightrope.csv", false);
     dataCollection = new TightropeData(file, markerHeightCal);
     SendMCECommand.SetTreadmillSpeed((float)nudSpeed.Value);
     //feetSound.Enabled = true;
     plotFeet = new ZedGraphPlotForm();
     plotFeet.ContinuePlotting = true;
     //asymmetryAnalyser.Enabled = true;
 }
Ejemplo n.º 6
0
 private void btnVisualFeedback_Click(object sender, EventArgs e)
 {
     if (btnVisualFeedback.Text == "Start visual feedback")
     {
         btnVisualFeedback.Text = "Stop visual feedback";
         SendMCECommand.SetTreadmillSpeed((float)nudSpeed.Value);
         System.Diagnostics.Debug.WriteLine("Speed sent:" + ((float)nudSpeed.Value).ToString());
     }
     else
     {
         btnVisualFeedback.Text = "Start visual feedback";
         SendMCECommand.SetTreadmillSpeed(0.0F);
     }
 }
Ejemplo n.º 7
0
        private void StopData()
        {
            SendMCECommand.SetTreadmillSpeed(0.0F);
            timer1.Enabled = false;
            guiUpdate.Stop();
            dataCollection.DataEventCleanUp();
            allPositionData.MarkerDataCollectionCleanUp();
            person.StopTestFrameReceiveEvent();
            //person.Right.FootCleanUp();
            //person.Left.FootCleanUp();
            //person.Left = null;
            //person.Right = null;
            System.Diagnostics.Debug.WriteLine("End of session.");
            if (cbTestID.Text == "Sound")
            {
                sound.StopUpdate = true;
                if (cbDiscrete.Checked)
                {
                    sound.DiscreteFootDown_Off();
                }
                sound.FootDown = false;
                sound.StopPlaying();
                //sound.EndCurrentEnvironment();
            }
            btnStartTreadmill.Text = "Start task";
            if (!Directory.Exists(txtFileName.Text))
            {
                FolderSetup();
            }
            dataCollection.ToFile();
            dataCollection.WriteRawFeetData();
            allPositionData.FileMarkerListPositionData();
            allPositionData.FileMarkerListPositionData_CSV();
            //dataCollection.WriteAccuracyData();
            startTime      = 0;
            Foot.Frontfoot = null;

            person.PersonData.AddFileName(txtFileName.Text);
            lbFileNames.Items.Add(txtFileName.Text);
            int tmp = int.Parse(txtTestNumber.Text);

            tmp++;
            txtTestNumber.Text        = tmp.ToString();
            txtFileName.Text          = cbTestID.Text + @"\" + cbTestID.Text + "_" + txtTestNumber.Text + "_" + person.PersonData.PersonID;
            btnSavePersonData.Enabled = true;
        }
Ejemplo n.º 8
0
        private void StartData()
        {
            //if (CalibrateFeet() == true)//check that no exception occurred during feet calibtation
            {
                btnStartTreadmill.Text = "Stop task";
                string fileID = fbdPath.SelectedPath + @"\" + txtFileName.Text;
                if (person.Left != null)
                {
                    startTime       = person.Left.CurrentMarker.TimeStamp;
                    dataCollection  = new TightropeData(person, fileID, startTime);
                    allPositionData = new MarkerDataCollection(fileID);

                    //wait here for WFRE/Frontfoot to be not null
                    if (cbTestID.Text == "Sound")
                    {
                        sound.Left  = person.Left;
                        sound.Right = person.Right;
                        if (cbDiscrete.Checked)
                        {
                            sound.FootDown = true;
                            sound.DiscreteFootDown_On();
                        }
                        else
                        {
                            sound.FootDown = false;
                        }
                        if (cbFrequency.Checked)
                        {
                            sound.StartSound();
                        }
                    }
                    person.NewTestFrameReceiveEvent();
                    SendMCECommand.SetTreadmillSpeed((float)nudSpeed.Value);
                    timer1.Interval = testlength;
                    timer1.Enabled  = true;
                    guiUpdate.Start();
                }
            }
        }