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); } }
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); } }
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; }
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); } }
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); } }
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)"); } }
private void onFormClosing(object sender, FormClosingEventArgs e) { IsFormClosing = true; AECG100.StopOutputWaveform(); }
public void ReconnectUSB() { AECG100.Init(connectedCB); }
public void ResetUSB() { AECG100.Free(); }
private void onImpedanceTestCheckedChanged(object sender, EventArgs e) { ecgWaveform.Impedance = checkImpedanceTest.Checked ? (int)ECGImpedanceEnable.Off : (int)ECGImpedanceEnable.On; AECG100.DeviceEnableImpedance((ECGImpedanceEnable)ecgWaveform.Impedance); }
private void onElectrodeCheckedChanged(object sender, EventArgs e) { ecgWaveform.Electrode = _radioElectrodeRightArm.Checked ? (int)Electrode.RightArm : (int)Electrode.LeftArm; AECG100.DeviceSetElectrode((Electrode)ecgWaveform.Electrode); }