repo time

Dependencies:   mbed MAX14720 MAX30205 USBDevice

Committer:
darienf
Date:
Tue Apr 06 06:41:40 2021 +0000
Revision:
20:6d2af70c92ab
another repo

Who changed what in which revision?

UserRevisionLine numberNew contents of line
darienf 20:6d2af70c92ab 1 /*******************************************************************************
darienf 20:6d2af70c92ab 2 * Copyright (C) 2016 Maxim Integrated Products, Inc., All rights Reserved.
darienf 20:6d2af70c92ab 3 *
darienf 20:6d2af70c92ab 4 * This software is protected by copyright laws of the United States and
darienf 20:6d2af70c92ab 5 * of foreign countries. This material may also be protected by patent laws
darienf 20:6d2af70c92ab 6 * and technology transfer regulations of the United States and of foreign
darienf 20:6d2af70c92ab 7 * countries. This software is furnished under a license agreement and/or a
darienf 20:6d2af70c92ab 8 * nondisclosure agreement and may only be used or reproduced in accordance
darienf 20:6d2af70c92ab 9 * with the terms of those agreements. Dissemination of this information to
darienf 20:6d2af70c92ab 10 * any party or parties not specified in the license agreement and/or
darienf 20:6d2af70c92ab 11 * nondisclosure agreement is expressly prohibited.
darienf 20:6d2af70c92ab 12 *
darienf 20:6d2af70c92ab 13 * The above copyright notice and this permission notice shall be included
darienf 20:6d2af70c92ab 14 * in all copies or substantial portions of the Software.
darienf 20:6d2af70c92ab 15 *
darienf 20:6d2af70c92ab 16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
darienf 20:6d2af70c92ab 17 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
darienf 20:6d2af70c92ab 18 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
darienf 20:6d2af70c92ab 19 * IN NO EVENT SHALL MAXIM INTEGRATED BE LIABLE FOR ANY CLAIM, DAMAGES
darienf 20:6d2af70c92ab 20 * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
darienf 20:6d2af70c92ab 21 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
darienf 20:6d2af70c92ab 22 * OTHER DEALINGS IN THE SOFTWARE.
darienf 20:6d2af70c92ab 23 *
darienf 20:6d2af70c92ab 24 * Except as contained in this notice, the name of Maxim Integrated
darienf 20:6d2af70c92ab 25 * Products, Inc. shall not be used except as stated in the Maxim Integrated
darienf 20:6d2af70c92ab 26 * Products, Inc. Branding Policy.
darienf 20:6d2af70c92ab 27 *
darienf 20:6d2af70c92ab 28 * The mere transfer of this software does not imply any licenses
darienf 20:6d2af70c92ab 29 * of trade secrets, proprietary technology, copyrights, patents,
darienf 20:6d2af70c92ab 30 * trademarks, maskwork rights, or any other form of intellectual
darienf 20:6d2af70c92ab 31 * property whatsoever. Maxim Integrated Products, Inc. retains all
darienf 20:6d2af70c92ab 32 * ownership rights.
darienf 20:6d2af70c92ab 33 *******************************************************************************
darienf 20:6d2af70c92ab 34 */
darienf 20:6d2af70c92ab 35
darienf 20:6d2af70c92ab 36 using System;
darienf 20:6d2af70c92ab 37 using System.Collections.Generic;
darienf 20:6d2af70c92ab 38 using System.ComponentModel;
darienf 20:6d2af70c92ab 39 using System.Data;
darienf 20:6d2af70c92ab 40 using System.Drawing;
darienf 20:6d2af70c92ab 41 using System.Linq;
darienf 20:6d2af70c92ab 42 using System.Text;
darienf 20:6d2af70c92ab 43 using System.Windows.Forms;
darienf 20:6d2af70c92ab 44
darienf 20:6d2af70c92ab 45 namespace HealthSensorPlatform
darienf 20:6d2af70c92ab 46 {
darienf 20:6d2af70c92ab 47 // Code for ECG Input Mux Tab
darienf 20:6d2af70c92ab 48 public partial class HspForm
darienf 20:6d2af70c92ab 49 {
darienf 20:6d2af70c92ab 50 List<RegisterField> bioZInputMuxField = new List<RegisterField>();
darienf 20:6d2af70c92ab 51
darienf 20:6d2af70c92ab 52 // Needed for dynamic changing of options
darienf 20:6d2af70c92ab 53 RegisterField biozCalFiftyField;
darienf 20:6d2af70c92ab 54
darienf 20:6d2af70c92ab 55 void initalizeBioZInputMuxFields()
darienf 20:6d2af70c92ab 56 {
darienf 20:6d2af70c92ab 57 string[] enDcloffOptions = { "Disabled*", "ECG Ch.", "BioZ Ch." };
darienf 20:6d2af70c92ab 58 string[] dcloffIpolOptions = { "P: Pull Up, N: Pull Down*", "P: Pull Down, N: Pull Up" };
darienf 20:6d2af70c92ab 59 string[] dcloffImagOptions = { "0 nA/Disabled*", "5 nA", "10 nA", "20 nA", "50 nA", "100 nA" };
darienf 20:6d2af70c92ab 60 string[] dcloffVthOptions = { "VMID ±300 mV*", "VMID ±400 mV", "VMID ±450 mV", "VMID ±500 mV" };
darienf 20:6d2af70c92ab 61
darienf 20:6d2af70c92ab 62 string[] bmuxOpenpOptions = { "Connected", "Isolated*" };
darienf 20:6d2af70c92ab 63 string[] bmuxOpennOptions = { "Connected", "Isolated*" };
darienf 20:6d2af70c92ab 64
darienf 20:6d2af70c92ab 65 string[] enRbiasOptions = { "Disabled*", "ECG Bias", "BIOZ Bias" };
darienf 20:6d2af70c92ab 66 string[] rBiasvOptions = { "50MΩ", "100MΩ*", "200MΩ" };
darienf 20:6d2af70c92ab 67 string[] rBiaspOptions = { "Disconnected*", "Connected" };
darienf 20:6d2af70c92ab 68 string[] rBiasnOptions = { "Disconnected*", "Connected" };
darienf 20:6d2af70c92ab 69
darienf 20:6d2af70c92ab 70 string[] calEnVcalOptions = { "Disabled*", "Enabled" };
darienf 20:6d2af70c92ab 71 string[] calVmodeOptions = { "Unipolar*", "Bipolar" };
darienf 20:6d2af70c92ab 72 string[] calVmagOptions = { "0.25 mV*", "0.50 mV" };
darienf 20:6d2af70c92ab 73 string[] calFcalOptions = { "FMSTR/128 (~256Hz)", "FMSTR/512 (~64Hz)", "FMSTR/2048 (~16Hz)", "FMSTR/8192 (~4Hz)",
darienf 20:6d2af70c92ab 74 "FMSTR/2^15 (~1Hz)*", "FMSTR/2^17 (~1/4Hz)", "FMSTR/2^19 (~1/16Hz)", "FMSTR/2^21 (~1/64Hz)" };
darienf 20:6d2af70c92ab 75 string[] calFiftyOptions = { "Time High", "50%*" };
darienf 20:6d2af70c92ab 76 string[] calThighOptions = new string[2048/8]; // Assume FMSTR = 32768 Hz
darienf 20:6d2af70c92ab 77 for (int i = 0; i < 2048/8; i++)
darienf 20:6d2af70c92ab 78 {
darienf 20:6d2af70c92ab 79 calThighOptions[i] = (30.52 * i * 8).ToString("F0") + " μs";
darienf 20:6d2af70c92ab 80 }
darienf 20:6d2af70c92ab 81 calThighOptions[0] += "*"; // Default
darienf 20:6d2af70c92ab 82
darienf 20:6d2af70c92ab 83 string[] calPSelOptions = { "None*", "VMID", "VCALP", "VCALN" };
darienf 20:6d2af70c92ab 84 string[] calNSelOptions = calPSelOptions;
darienf 20:6d2af70c92ab 85
darienf 20:6d2af70c92ab 86 RegisterField enDcloffField = new RegisterField { Name = "\nEN_DCLOFF", Register = 0x10, Index = 12, Width = 2, Descriptions = enDcloffOptions, Label = lblBioZEnDcloff, Control = cboBioZEnDcloff, Device = max30001 };
darienf 20:6d2af70c92ab 87 RegisterField dcloffIpolField = new RegisterField { Name = "DCLOFF_IPOL", Register = 0x10, Index = 11, Width = 1, Descriptions = dcloffIpolOptions, Label = lblBioZDcloffIpol, Control = cboBioZDcloffIpol, Device = max30001 };
darienf 20:6d2af70c92ab 88 RegisterField dcloffImagField = new RegisterField { Name = "DCLOFF_IMAG", Register = 0x10, Index = 8, Width = 3, Descriptions = dcloffImagOptions, Label = lblBioZDcloffImag, Control = cboBioZDcloffImag, Device = max30001 };
darienf 20:6d2af70c92ab 89 RegisterField dcloffVthField = new RegisterField { Name = "DCLOFF_VTH", Register = 0x10, Index = 6, Width = 2, Descriptions = dcloffVthOptions, Label = lblBioZDcloffVth, Control = cboBioZDcloffVth, Device = max30001 };
darienf 20:6d2af70c92ab 90 bioZInputMuxField.Add(enDcloffField);
darienf 20:6d2af70c92ab 91 bioZInputMuxField.Add(dcloffIpolField);
darienf 20:6d2af70c92ab 92 bioZInputMuxField.Add(dcloffImagField);
darienf 20:6d2af70c92ab 93 bioZInputMuxField.Add(dcloffVthField);
darienf 20:6d2af70c92ab 94
darienf 20:6d2af70c92ab 95 RegisterField enUlpLonField = new RegisterField { Name = "\nEN_ULP_LON", Register = 0x10, Index = 22, Width = 2, Descriptions = enDcloffOptions, Label = lblBmuxEnUlpLon, Control = cboBmuxEnUlpLon, Device = max30001 };
darienf 20:6d2af70c92ab 96 bioZInputMuxField.Add(enUlpLonField);
darienf 20:6d2af70c92ab 97
darienf 20:6d2af70c92ab 98 RegisterField bmuxOpenpField = new RegisterField { Name = "BMUX_OPENP", Register = 0x17, Index = 21, Width = 1, Descriptions = bmuxOpenpOptions, Label = lblBioZBmuxOpenp, Control = cboBioZBmuxOpenp, Device = max30001 };
darienf 20:6d2af70c92ab 99 RegisterField bmuxOpennField = new RegisterField { Name = "BMUX_OPENN", Register = 0x17, Index = 20, Width = 1, Descriptions = bmuxOpennOptions, Label = lblBioZBmuxOpenn, Control = cboBioZBmuxOpenn, Device = max30001 };
darienf 20:6d2af70c92ab 100 bioZInputMuxField.Add(bmuxOpenpField);
darienf 20:6d2af70c92ab 101 bioZInputMuxField.Add(bmuxOpennField);
darienf 20:6d2af70c92ab 102
darienf 20:6d2af70c92ab 103 RegisterField enRbiasField = new RegisterField { Name = "\nEN_RBIAS", Register = 0x10, Index = 4, Width = 2, Descriptions = enDcloffOptions, Label = lblBioZEnRbias, Control = cboBioZEnRbias, Device = max30001 };
darienf 20:6d2af70c92ab 104 RegisterField rBiasvField = new RegisterField { Name = "RBIASV", Register = 0x10, Index = 2, Width = 2, Descriptions = rBiasvOptions, Label = lblBioZRbiasv, Control = cboBioZRbiasv, Device = max30001 };
darienf 20:6d2af70c92ab 105 RegisterField rBiaspField = new RegisterField { Name = "RBIASP", Register = 0x10, Index = 1, Width = 1, Descriptions = rBiaspOptions, Label = lblBioZRbiasp, Control = cboBioZRbiasp, Device = max30001 };
darienf 20:6d2af70c92ab 106 RegisterField rBiasnField = new RegisterField { Name = "RBIASN", Register = 0x10, Index = 0, Width = 1, Descriptions = rBiasnOptions, Label = lblBioZRbiasn, Control = cboBioZRbiasn, Device = max30001 };
darienf 20:6d2af70c92ab 107 bioZInputMuxField.Add(enRbiasField);
darienf 20:6d2af70c92ab 108 bioZInputMuxField.Add(rBiasvField);
darienf 20:6d2af70c92ab 109 bioZInputMuxField.Add(rBiaspField);
darienf 20:6d2af70c92ab 110 bioZInputMuxField.Add(rBiasnField);
darienf 20:6d2af70c92ab 111
darienf 20:6d2af70c92ab 112 RegisterField calEnVcalField = new RegisterField { Name = "CAL_EN_VCAL", Register = 0x12, Index = 22, Width = 1, Descriptions = calEnVcalOptions, Label = lblBioZCalEnVcal, Control = cboBioZCalEnVcal, Device = max30001 };
darienf 20:6d2af70c92ab 113 RegisterField calVmodeField = new RegisterField { Name = "CAL_VMODE", Register = 0x12, Index = 21, Width = 1, Descriptions = calVmodeOptions, Label = lblBioZCalVMode, Control = cboBioZCalVMode, Device = max30001 };
darienf 20:6d2af70c92ab 114 RegisterField calVmagField = new RegisterField { Name = "CAL_VMAG", Register = 0x12, Index = 20, Width = 1, Descriptions = calVmagOptions, Label = lblBioZCalVmag, Control = cboBioZCalVmag, Device = max30001 };
darienf 20:6d2af70c92ab 115 RegisterField calFcalField = new RegisterField { Name = "CAL_FCAL", Register = 0x12, Index = 12, Width = 3, Descriptions = calFcalOptions, Label = lblBioZCalFcal, Control = cboBioZCalFcal, Device = max30001 };
darienf 20:6d2af70c92ab 116 biozCalFiftyField = new RegisterField { Name = "CAL_FIFTY", Register = 0x12, Index = 11, Width = 1, Descriptions = calFiftyOptions, Label = lblBioZCalFifty, Control = cboBioZCalFifty, Device = max30001 };
darienf 20:6d2af70c92ab 117 RegisterField calThighField = new RegisterField { Name = "CAL_THIGH", Register = 0x12, Index = 3, Width = 8, Descriptions = calThighOptions, Label = lblBioZCalThigh, Control = cboBioZCalThigh, Device = max30001 };
darienf 20:6d2af70c92ab 118 bioZInputMuxField.Add(calEnVcalField);
darienf 20:6d2af70c92ab 119 bioZInputMuxField.Add(calVmodeField);
darienf 20:6d2af70c92ab 120 bioZInputMuxField.Add(calVmagField);
darienf 20:6d2af70c92ab 121 bioZInputMuxField.Add(calFcalField);
darienf 20:6d2af70c92ab 122 bioZInputMuxField.Add(biozCalFiftyField);
darienf 20:6d2af70c92ab 123 bioZInputMuxField.Add(calThighField);
darienf 20:6d2af70c92ab 124
darienf 20:6d2af70c92ab 125 RegisterField calPSelField = new RegisterField { Name = "BMUX_CALP_SEL", Register = 0x17, Index = 18, Width = 2, Descriptions = calPSelOptions, Label = lblBioZBmuxCalpSel, Control = cboBioZBmuxCalnSel, Device = max30001 };
darienf 20:6d2af70c92ab 126 RegisterField calNSelField = new RegisterField { Name = "BMUX_CALN_SEL", Register = 0x17, Index = 16, Width = 2, Descriptions = calNSelOptions, Label = lblBioZBmuxCalnSel, Control = cboBioZBmuxCalpSel, Device = max30001 };
darienf 20:6d2af70c92ab 127 bioZInputMuxField.Add(calPSelField);
darienf 20:6d2af70c92ab 128 bioZInputMuxField.Add(calNSelField);
darienf 20:6d2af70c92ab 129 }
darienf 20:6d2af70c92ab 130
darienf 20:6d2af70c92ab 131 void BioZInputMuxUpdateRegisters()
darienf 20:6d2af70c92ab 132 {
darienf 20:6d2af70c92ab 133 internalUpdate = true;
darienf 20:6d2af70c92ab 134 ReadComboBoxesRegisters(bioZInputMuxField);
darienf 20:6d2af70c92ab 135 internalUpdate = false;
darienf 20:6d2af70c92ab 136 }
darienf 20:6d2af70c92ab 137
darienf 20:6d2af70c92ab 138 private void cboBioZCalFifty_SelectedIndexChanged(object sender, EventArgs e)
darienf 20:6d2af70c92ab 139 {
darienf 20:6d2af70c92ab 140 if (cboCalFifty.SelectedIndex == 1)
darienf 20:6d2af70c92ab 141 {
darienf 20:6d2af70c92ab 142 cboCalThigh.Enabled = false;
darienf 20:6d2af70c92ab 143 }
darienf 20:6d2af70c92ab 144 else
darienf 20:6d2af70c92ab 145 {
darienf 20:6d2af70c92ab 146 cboCalThigh.Enabled = true;
darienf 20:6d2af70c92ab 147 }
darienf 20:6d2af70c92ab 148 }
darienf 20:6d2af70c92ab 149
darienf 20:6d2af70c92ab 150 private void cboBioZEnDcloff_SelectedIndexChanged(object sender, EventArgs e)
darienf 20:6d2af70c92ab 151 {
darienf 20:6d2af70c92ab 152 redrawBioZMuxImage();
darienf 20:6d2af70c92ab 153 }
darienf 20:6d2af70c92ab 154
darienf 20:6d2af70c92ab 155
darienf 20:6d2af70c92ab 156 private void cboBioZDcloffIpol_SelectedIndexChanged(object sender, EventArgs e)
darienf 20:6d2af70c92ab 157 {
darienf 20:6d2af70c92ab 158 redrawBioZMuxImage();
darienf 20:6d2af70c92ab 159 }
darienf 20:6d2af70c92ab 160
darienf 20:6d2af70c92ab 161 private void cboBmuxEnUlpLon_SelectedIndexChanged(object sender, EventArgs e)
darienf 20:6d2af70c92ab 162 {
darienf 20:6d2af70c92ab 163 redrawBioZMuxImage();
darienf 20:6d2af70c92ab 164 }
darienf 20:6d2af70c92ab 165
darienf 20:6d2af70c92ab 166 private void cboBioZBmuxOpenp_SelectedIndexChanged(object sender, EventArgs e)
darienf 20:6d2af70c92ab 167 {
darienf 20:6d2af70c92ab 168 redrawBioZMuxImage();
darienf 20:6d2af70c92ab 169 }
darienf 20:6d2af70c92ab 170
darienf 20:6d2af70c92ab 171 private void cboBioZBmuxOpenn_SelectedIndexChanged(object sender, EventArgs e)
darienf 20:6d2af70c92ab 172 {
darienf 20:6d2af70c92ab 173 redrawBioZMuxImage();
darienf 20:6d2af70c92ab 174 }
darienf 20:6d2af70c92ab 175
darienf 20:6d2af70c92ab 176 private void cboBioZEnRbias_SelectedIndexChanged(object sender, EventArgs e)
darienf 20:6d2af70c92ab 177 {
darienf 20:6d2af70c92ab 178 redrawBioZMuxImage();
darienf 20:6d2af70c92ab 179 }
darienf 20:6d2af70c92ab 180
darienf 20:6d2af70c92ab 181 private void cboBioZRbiasp_SelectedIndexChanged(object sender, EventArgs e)
darienf 20:6d2af70c92ab 182 {
darienf 20:6d2af70c92ab 183 redrawBioZMuxImage();
darienf 20:6d2af70c92ab 184 }
darienf 20:6d2af70c92ab 185
darienf 20:6d2af70c92ab 186 private void cboBioZRbiasn_SelectedIndexChanged(object sender, EventArgs e)
darienf 20:6d2af70c92ab 187 {
darienf 20:6d2af70c92ab 188 redrawBioZMuxImage();
darienf 20:6d2af70c92ab 189 }
darienf 20:6d2af70c92ab 190
darienf 20:6d2af70c92ab 191 private void cboBioZBmuxCalpSel_SelectedIndexChanged(object sender, EventArgs e)
darienf 20:6d2af70c92ab 192 {
darienf 20:6d2af70c92ab 193 redrawBioZMuxImage();
darienf 20:6d2af70c92ab 194 }
darienf 20:6d2af70c92ab 195
darienf 20:6d2af70c92ab 196 private void cboBioZBmuxCalnSel_SelectedIndexChanged(object sender, EventArgs e)
darienf 20:6d2af70c92ab 197 {
darienf 20:6d2af70c92ab 198 redrawBioZMuxImage();
darienf 20:6d2af70c92ab 199 }
darienf 20:6d2af70c92ab 200
darienf 20:6d2af70c92ab 201 private void cboBioZCalEnVcal_SelectedIndexChanged(object sender, EventArgs e)
darienf 20:6d2af70c92ab 202 {
darienf 20:6d2af70c92ab 203 redrawBioZMuxImage();
darienf 20:6d2af70c92ab 204 }
darienf 20:6d2af70c92ab 205
darienf 20:6d2af70c92ab 206
darienf 20:6d2af70c92ab 207 private void redrawBioZMuxImage()
darienf 20:6d2af70c92ab 208 {
darienf 20:6d2af70c92ab 209 //Lead Off Check
darienf 20:6d2af70c92ab 210 if (picLoff1.Image != null)
darienf 20:6d2af70c92ab 211 picLoff1.Image.Dispose();
darienf 20:6d2af70c92ab 212 if (picLoff2.Image != null)
darienf 20:6d2af70c92ab 213 picLoff2.Image.Dispose();
darienf 20:6d2af70c92ab 214 if (cboBioZEnDcloff.SelectedIndex == 2)
darienf 20:6d2af70c92ab 215 {
darienf 20:6d2af70c92ab 216
darienf 20:6d2af70c92ab 217 if (cboBioZDcloffIpol.SelectedIndex == 0)
darienf 20:6d2af70c92ab 218 {
darienf 20:6d2af70c92ab 219 picLoff1.Image = null;
darienf 20:6d2af70c92ab 220 picLoff2.Image = Properties.Resources.bioz_input_muxloff2;
darienf 20:6d2af70c92ab 221 }
darienf 20:6d2af70c92ab 222 else
darienf 20:6d2af70c92ab 223 {
darienf 20:6d2af70c92ab 224 picLoff1.Image = Properties.Resources.bioz_input_muxloff1;
darienf 20:6d2af70c92ab 225 picLoff2.Image = null;
darienf 20:6d2af70c92ab 226 }
darienf 20:6d2af70c92ab 227 }
darienf 20:6d2af70c92ab 228 else
darienf 20:6d2af70c92ab 229 {
darienf 20:6d2af70c92ab 230 picLoff1.Image = null;
darienf 20:6d2af70c92ab 231 picLoff2.Image = null;
darienf 20:6d2af70c92ab 232 }
darienf 20:6d2af70c92ab 233
darienf 20:6d2af70c92ab 234 //Lead On Check Enable
darienf 20:6d2af70c92ab 235 if (picLeadOn.Image != null)
darienf 20:6d2af70c92ab 236 picLeadOn.Image.Dispose();
darienf 20:6d2af70c92ab 237 if (cboBmuxEnUlpLon.SelectedIndex == 2)
darienf 20:6d2af70c92ab 238 {
darienf 20:6d2af70c92ab 239 picLeadOn.Image = Properties.Resources.bioz_input_muxlon;
darienf 20:6d2af70c92ab 240 }
darienf 20:6d2af70c92ab 241 else
darienf 20:6d2af70c92ab 242 {
darienf 20:6d2af70c92ab 243 picLeadOn.Image = null;
darienf 20:6d2af70c92ab 244 }
darienf 20:6d2af70c92ab 245
darienf 20:6d2af70c92ab 246 //Switches
darienf 20:6d2af70c92ab 247 if (picBioZsw1.Image != null)
darienf 20:6d2af70c92ab 248 picBioZsw1.Image.Dispose();
darienf 20:6d2af70c92ab 249 if (picBioZsw2.Image != null)
darienf 20:6d2af70c92ab 250 picBioZsw2.Image.Dispose();
darienf 20:6d2af70c92ab 251 if (cboBioZBmuxOpenp.SelectedIndex == 0) //if BIP "Connected"
darienf 20:6d2af70c92ab 252 {
darienf 20:6d2af70c92ab 253 picBioZsw1.Image = Properties.Resources.bioz_input_muxsw1;
darienf 20:6d2af70c92ab 254 }
darienf 20:6d2af70c92ab 255 else
darienf 20:6d2af70c92ab 256 {
darienf 20:6d2af70c92ab 257 picBioZsw1.Image = null;
darienf 20:6d2af70c92ab 258 }
darienf 20:6d2af70c92ab 259 if (cboBioZBmuxOpenn.SelectedIndex == 0) //if BIN "Connected"
darienf 20:6d2af70c92ab 260 {
darienf 20:6d2af70c92ab 261 picBioZsw2.Image = Properties.Resources.bioz_input_muxsw2;
darienf 20:6d2af70c92ab 262 }
darienf 20:6d2af70c92ab 263 else
darienf 20:6d2af70c92ab 264 {
darienf 20:6d2af70c92ab 265 picBioZsw2.Image = null;
darienf 20:6d2af70c92ab 266 }
darienf 20:6d2af70c92ab 267
darienf 20:6d2af70c92ab 268 //Lead Bias
darienf 20:6d2af70c92ab 269 if (picLeadBias1.Image != null)
darienf 20:6d2af70c92ab 270 picLeadBias1.Image.Dispose();
darienf 20:6d2af70c92ab 271 if (picLeadBias2.Image != null)
darienf 20:6d2af70c92ab 272 picLeadBias2.Image.Dispose();
darienf 20:6d2af70c92ab 273 if (cboBioZEnRbias.SelectedIndex == 2)
darienf 20:6d2af70c92ab 274 {
darienf 20:6d2af70c92ab 275 if (cboBioZRbiasp.SelectedIndex == 1)
darienf 20:6d2af70c92ab 276 {
darienf 20:6d2af70c92ab 277 picLeadBias1.Image = Properties.Resources.bioz_input_muxlb1;
darienf 20:6d2af70c92ab 278 }
darienf 20:6d2af70c92ab 279 else
darienf 20:6d2af70c92ab 280 {
darienf 20:6d2af70c92ab 281 picLeadBias1.Image = null;
darienf 20:6d2af70c92ab 282 }
darienf 20:6d2af70c92ab 283
darienf 20:6d2af70c92ab 284 if (cboBioZRbiasn.SelectedIndex == 1)
darienf 20:6d2af70c92ab 285 {
darienf 20:6d2af70c92ab 286 picLeadBias2.Image = Properties.Resources.bioz_input_muxlb2;
darienf 20:6d2af70c92ab 287 }
darienf 20:6d2af70c92ab 288 else
darienf 20:6d2af70c92ab 289 {
darienf 20:6d2af70c92ab 290 picLeadBias2.Image = null;
darienf 20:6d2af70c92ab 291 }
darienf 20:6d2af70c92ab 292 }
darienf 20:6d2af70c92ab 293 else
darienf 20:6d2af70c92ab 294 {
darienf 20:6d2af70c92ab 295 picLeadBias1.Image = null;
darienf 20:6d2af70c92ab 296 picLeadBias2.Image = null;
darienf 20:6d2af70c92ab 297 }
darienf 20:6d2af70c92ab 298
darienf 20:6d2af70c92ab 299 //Calibration
darienf 20:6d2af70c92ab 300 if (picBioZCal1.Image != null)
darienf 20:6d2af70c92ab 301 picBioZCal1.Image.Dispose();
darienf 20:6d2af70c92ab 302 if (picBioZCal2.Image != null)
darienf 20:6d2af70c92ab 303 picBioZCal2.Image.Dispose();
darienf 20:6d2af70c92ab 304 if (cboBioZCalEnVcal.SelectedIndex == 1)
darienf 20:6d2af70c92ab 305 {
darienf 20:6d2af70c92ab 306 if (cboBioZBmuxCalpSel.SelectedIndex == 1 |
darienf 20:6d2af70c92ab 307 cboBioZBmuxCalpSel.SelectedIndex == 2 |
darienf 20:6d2af70c92ab 308 cboBioZBmuxCalpSel.SelectedIndex == 3)
darienf 20:6d2af70c92ab 309 {
darienf 20:6d2af70c92ab 310 picBioZCal1.Image = Properties.Resources.bioz_input_muxcal1;
darienf 20:6d2af70c92ab 311 }
darienf 20:6d2af70c92ab 312 else
darienf 20:6d2af70c92ab 313 {
darienf 20:6d2af70c92ab 314 picBioZCal1.Image = null;
darienf 20:6d2af70c92ab 315 }
darienf 20:6d2af70c92ab 316 if (cboBioZBmuxCalnSel.SelectedIndex == 1 |
darienf 20:6d2af70c92ab 317 cboBioZBmuxCalnSel.SelectedIndex == 2 |
darienf 20:6d2af70c92ab 318 cboBioZBmuxCalnSel.SelectedIndex == 3)
darienf 20:6d2af70c92ab 319 {
darienf 20:6d2af70c92ab 320 picBioZCal2.Image = Properties.Resources.bioz_input_muxcal2;
darienf 20:6d2af70c92ab 321 }
darienf 20:6d2af70c92ab 322 else
darienf 20:6d2af70c92ab 323 {
darienf 20:6d2af70c92ab 324 picBioZCal2.Image = null;
darienf 20:6d2af70c92ab 325 }
darienf 20:6d2af70c92ab 326 }
darienf 20:6d2af70c92ab 327 else
darienf 20:6d2af70c92ab 328 {
darienf 20:6d2af70c92ab 329 picBioZCal1.Image = null;
darienf 20:6d2af70c92ab 330 picBioZCal2.Image = null;
darienf 20:6d2af70c92ab 331 }
darienf 20:6d2af70c92ab 332
darienf 20:6d2af70c92ab 333
darienf 20:6d2af70c92ab 334 }
darienf 20:6d2af70c92ab 335
darienf 20:6d2af70c92ab 336
darienf 20:6d2af70c92ab 337 }
darienf 20:6d2af70c92ab 338 }