Esempio n. 1
0
        public void onStartOutput()
        {
            channel1OutputWaveform = channel1Waveform;
            channel2OutputWaveform = channel2Waveform;

            MainForm.Instance.GraphSetYAxisScale(0, 0, 30);
            MainForm.Instance.GraphSetYAxisScale(1, 0, 30);
            OutputCounter = 0;

            bool result = false;

            if (MainForm.Instance.PPGChannel2Supported)
            {
                result = AECG100.OutputPPGEx(ref channel1OutputWaveform, ref channel2OutputWaveform, outputChannel1CB, outputChannel2CB);
            }
            else
            {
                result = AECG100.OutputPPG(PPGChannel.Channel1, ref channel1OutputWaveform, outputChannel1CB);
            }

            if (result)
            {
                MainForm.Instance.OutputStarted();
            }
            else
            {
                MessageBox.Show("Error: output waveform failed", "WhaleTeq", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Esempio n. 2
0
        private void onDCOffsetValueChanged(object sender, EventArgs e)
        {
            if (!checkDCOffsetVariable.Checked)
            {
                int dc = (int)numDCOffset.Value;
                if (dc > 0)
                {
                    numDCOffset.Value = 300;
                }
                else if (dc < 0)
                {
                    numDCOffset.Value = -300;
                }
                else
                {
                    numDCOffset.Value = 0;
                }
            }
            ecgWaveform.DCOffset = (int)numDCOffset.Value;

            if (!checkDCOffsetVariable.Checked)
            {
                AECG100.DeviceSetDCOffset(ecgWaveform.DCOffset);
            }
        }
Esempio n. 3
0
 private void onOutputClick(object sender, EventArgs e)
 {
     if (Outputting)
     {
         //(tabMain.TabPages[tabMain.SelectedIndex].Controls[0] as IPageControl).onStopOutput ();
         AECG100.StopOutputWaveform();
     }
     else
     {
         GraphReset();
         (tabMain.TabPages[tabMain.SelectedIndex].Controls[0] as IPageControl).onStartOutput();
     }
     btnOutput.Enabled = false;
 }
Esempio n. 4
0
        public void onStartOutput()
        {
            ecgOutputWaveform = ecgWaveform;

            MainForm.Instance.GraphSetYAxisScale(0, -5, 5);
            MainForm.Instance.GraphSetYAxisScale(1, -5, 5);
            OutputCounter = 0;

            bool result = AECG100.OutputECG(ref ecgOutputWaveform, outputCB);

            if (result)
            {
                MainForm.Instance.OutputStarted();
            }
            else
            {
                MessageBox.Show("Error: output waveform failed", "WhaleTeq", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Esempio n. 5
0
        public void onStartOutput()
        {
            ecgOutputWaveform = ecgWaveform;
            ppgOutputWaveform = ppgWaveform;

            MainForm.Instance.GraphSetYAxisScale(0, -5, 5);
            MainForm.Instance.GraphSetYAxisScale(1, 0, 30);
            OutputCounter = 0;

            bool result = AECG100.OutputECGAndPPG((int)numTimeDiffP.Value, ref ecgOutputWaveform, ref ppgOutputWaveform, outputECGCB, outputPPGCB);

            if (result)
            {
                MainForm.Instance.OutputStarted();
            }
            else
            {
                MessageBox.Show("Error: output waveform failed", "WhaleTeq", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Esempio n. 6
0
        private void DeviceConnectedHandler(bool connected)
        {
            if (this.InvokeRequired)
            {
                DeviceConnectedHandlerCallback cb = new DeviceConnectedHandlerCallback(DeviceConnectedHandler);
                this.BeginInvoke(cb, connected);
                return;
            }

            Connected = connected;

            if (connected)
            {
                AECG100.GetPPGDeviceInformation(out ppgModelInfo);

                UpdateFormTitle(Title + " (Device CONNECT)");
                NotifyConnected();
            }
            else
            {
                UpdateFormTitle(Title + " (Device NOT FOUND)");
            }
        }
Esempio n. 7
0
 private void onFormClosing(object sender, FormClosingEventArgs e)
 {
     IsFormClosing = true;
     AECG100.StopOutputWaveform();
 }
Esempio n. 8
0
 public void ReconnectUSB()
 {
     AECG100.Init(connectedCB);
 }
Esempio n. 9
0
 public void ResetUSB()
 {
     AECG100.Free();
 }
Esempio n. 10
0
 private void onImpedanceTestCheckedChanged(object sender, EventArgs e)
 {
     ecgWaveform.Impedance = checkImpedanceTest.Checked ? (int)ECGImpedanceEnable.Off : (int)ECGImpedanceEnable.On;
     AECG100.DeviceEnableImpedance((ECGImpedanceEnable)ecgWaveform.Impedance);
 }
Esempio n. 11
0
 private void onElectrodeCheckedChanged(object sender, EventArgs e)
 {
     ecgWaveform.Electrode = _radioElectrodeRightArm.Checked ? (int)Electrode.RightArm : (int)Electrode.LeftArm;
     AECG100.DeviceSetElectrode((Electrode)ecgWaveform.Electrode);
 }