Beispiel #1
0
        private bool DDX(bool bUpdate)
        {
            bool rc = true;

            try {
#if true
                DDV.DDX(bUpdate, this.comboBox12, ref m_ss.D38_410_MSTM);
                DDV.DDX(bUpdate, this.comboBox13, ref m_ss.D38_424_ALG1);
                DDV.DDX(bUpdate, this.comboBox14, ref m_ss.D38_422_ALG2);
                DDV.DDX(bUpdate, this.comboBox15, ref m_ss.D38_420_LEDC);
                DDV.DDX(bUpdate, this.comboBox16, ref m_ss.D38_434_PSG0);

                DDV.DDX(bUpdate, this.textBox36, ref m_ss.SCL_MAX_D38);
                DDV.DDX(bUpdate, this.textBox37, ref m_ss.SCL_MIN_D38);
                DDV.DDX(bUpdate, this.textBox1, ref m_ss.THD_VAL_PS);
                DDV.DDX(bUpdate, this.textBox2, ref m_ss.THD_LES_STR);
                DDV.DDX(bUpdate, this.textBox3, ref m_ss.THD_OVR_STR);
                DDV.DDX(bUpdate, this.numericUpDown3, ref m_ss.THD_FNT_SIZ);
#endif
#if true//2019.09.06(近接時間測定)
                DDV.DDX(bUpdate, this.checkBox1, ref m_ss.THD_MES_TIM);
                DDV.DDX(bUpdate, this.checkBox2, ref m_ss.EXT_MES_TIM);
#endif

                rc = true;
            }
            catch (Exception e) {
                G.mlog(e.Message);
                rc = false;
            }
            return(rc);
        }
Beispiel #2
0
        private void i2c_write()
        {
            try {
                int    busadr = int.Parse(this.comboBox7.Text, System.Globalization.NumberStyles.HexNumber);
                int    devadr = (int)this.numericUpDown2.Value;
                int    regadr = (int)this.numericUpDown3.Value;
                int[]  vals   = null;
                byte[] buf    = null;

                int ret, done;
                DDV.DDX(false, this.textBox9, ref vals, 16, 0, 255, /*bHEX*/ true);

                buf = new byte[vals.Length];
                for (int i = 0; i < buf.Length; i++)
                {
                    buf[i] = (byte)vals[i];
                }

                D.GET_I2C_WRT(busadr, devadr, regadr, buf.Length, buf, out ret, out done);

                this.textBox4.Text = ret.ToString();
                this.textBox5.Text = done.ToString();
            }
            catch (Exception ex) {
                G.mlog(ex.ToString());
            }
        }
Beispiel #3
0
        private bool DDX(bool bUpdate)
        {
            bool rc = true;

            //
            try {
#if false
                //---
                DDV.DDX(bUpdate, this.textBox10, ref m_ss.SEN_SCL_MAX[0]);
                DDV.DDX(bUpdate, this.textBox11, ref m_ss.SEN_SCL_MIN[0]);
                DDV.DDX(bUpdate, this.textBox12, ref m_ss.SEN_SCL_MAX[1]);
                DDV.DDX(bUpdate, this.textBox13, ref m_ss.SEN_SCL_MIN[1]);
                DDV.DDX(bUpdate, this.textBox14, ref m_ss.SEN_SCL_MAX[2]);
                DDV.DDX(bUpdate, this.textBox15, ref m_ss.SEN_SCL_MIN[2]);
                DDV.DDX(bUpdate, this.textBox16, ref m_ss.SEN_SCL_MAX[3]);
                DDV.DDX(bUpdate, this.textBox17, ref m_ss.SEN_SCL_MIN[3]);
                DDV.DDX(bUpdate, this.textBox18, ref m_ss.SEN_SCL_MAX[4]);
                DDV.DDX(bUpdate, this.textBox19, ref m_ss.SEN_SCL_MIN[4]);
                DDV.DDX(bUpdate, this.textBox20, ref m_ss.SEN_SCL_MAX[5]);
                DDV.DDX(bUpdate, this.textBox21, ref m_ss.SEN_SCL_MIN[5]);
                DDV.DDX(bUpdate, this.textBox22, ref m_ss.SEN_SCL_MAX[6]);
                DDV.DDX(bUpdate, this.textBox23, ref m_ss.SEN_SCL_MIN[6]);
                DDV.DDX(bUpdate, this.textBox24, ref m_ss.SEN_SCL_MAX[7]);
                DDV.DDX(bUpdate, this.textBox25, ref m_ss.SEN_SCL_MIN[7]);
                DDV.DDX(bUpdate, this.textBox26, ref m_ss.SEN_SCL_MAX[8]);
                DDV.DDX(bUpdate, this.textBox27, ref m_ss.SEN_SCL_MIN[8]);
                DDV.DDX(bUpdate, this.textBox28, ref m_ss.SEN_SCL_MAX[9]);
                DDV.DDX(bUpdate, this.textBox29, ref m_ss.SEN_SCL_MIN[9]);
                DDV.DDX(bUpdate, this.textBox30, ref m_ss.SEN_SCL_MAX[10]);
                DDV.DDX(bUpdate, this.textBox31, ref m_ss.SEN_SCL_MIN[10]);
                DDV.DDX(bUpdate, this.textBox32, ref m_ss.SEN_SCL_MAX[11]);
                DDV.DDX(bUpdate, this.textBox33, ref m_ss.SEN_SCL_MIN[11]);
                DDV.DDX(bUpdate, this.textBox34, ref m_ss.SEN_SCL_MAX[12]);
                DDV.DDX(bUpdate, this.textBox35, ref m_ss.SEN_SCL_MIN[12]);
                DDV.DDX(bUpdate, this.textBox36, ref m_ss.SEN_SCL_MAX[13]);
                DDV.DDX(bUpdate, this.textBox37, ref m_ss.SEN_SCL_MIN[13]);
                DDV.DDX(bUpdate, this.textBox38, ref m_ss.SEN_SCL_MAX[14]);
                DDV.DDX(bUpdate, this.textBox39, ref m_ss.SEN_SCL_MIN[14]);
                DDV.DDX(bUpdate, this.textBox40, ref m_ss.SEN_SCL_MAX[15]);
                DDV.DDX(bUpdate, this.textBox41, ref m_ss.SEN_SCL_MIN[15]);
                DDV.DDX(bUpdate, this.textBox42, ref m_ss.SEN_SCL_MAX[16]);
                DDV.DDX(bUpdate, this.textBox43, ref m_ss.SEN_SCL_MIN[16]);
                DDV.DDX(bUpdate, this.textBox44, ref m_ss.SEN_SCL_MAX[17]);
                DDV.DDX(bUpdate, this.textBox45, ref m_ss.SEN_SCL_MIN[17]);
                DDV.DDX(bUpdate, this.textBox46, ref m_ss.SEN_SCL_MAX[18]);
                DDV.DDX(bUpdate, this.textBox47, ref m_ss.SEN_SCL_MIN[18]);
                //ADC基準
                //ADC基準
                DDV.DDX(bUpdate, this.textBox48, ref m_ss.SEN_SCL_MAX[20]);
                DDV.DDX(bUpdate, this.textBox49, ref m_ss.SEN_SCL_MIN[20]);
                DDV.DDX(bUpdate, this.textBox50, ref m_ss.SEN_SCL_MAX[21]);
                DDV.DDX(bUpdate, this.textBox51, ref m_ss.SEN_SCL_MIN[21]);
                //-----
#endif
#if true
                DDV.DDX(bUpdate, this.textBox36, ref m_ss.SCL_MAX_D38);
                DDV.DDX(bUpdate, this.textBox37, ref m_ss.SCL_MIN_D38);
                DDV.DDX(bUpdate, this.textBox1, ref m_ss.THD_VAL_PS);
                DDV.DDX(bUpdate, this.textBox2, ref m_ss.THD_LES_STR);
                DDV.DDX(bUpdate, this.textBox3, ref m_ss.THD_OVR_STR);
                DDV.DDX(bUpdate, this.numericUpDown3, ref m_ss.THD_FNT_SIZ);
#endif
                rc = true;
            }
            catch (Exception e) {
                G.mlog(e.Message);
                rc = false;
            }
            return(rc);
        }
Beispiel #4
0
        private bool DDX(bool bUpdate)
        {
            bool rc = false;

            //
            try {
#if false
                DDV.DDX(bUpdate, this.textBox4, ref m_sp.DEV_ID);

                DDV.DDX(bUpdate, this.numericUpDown1, ref m_integ);
                DDV.DDX(bUpdate, this.comboBox2, ref m_sp.D29_0F0_GAIN);
                //---
                DDV.DDX(bUpdate, this.comboBox3, ref m_sp.D76_F20_HUMI);
                DDV.DDX(bUpdate, this.comboBox4, ref m_sp.D76_F42_PRES);
                DDV.DDX(bUpdate, this.comboBox5, ref m_sp.D76_F45_TEMP);
                DDV.DDX(bUpdate, this.comboBox6, ref m_sp.D76_F52_FILT);
                DDV.DDX(bUpdate, this.comboBox7, ref m_sp.D76_F55_STBY);
                //---
                DDV.DDX(bUpdate, this.numericUpDown4, ref m_sp.D68_190_SMRT);
                DDV.DDX(bUpdate, this.comboBox8, ref m_sp.D68_1A0_GLPF);
                DDV.DDX(bUpdate, this.comboBox9, ref m_sp.D68_1B3_GSCL);
                DDV.DDX(bUpdate, this.comboBox10, ref m_sp.D68_1D0_ALPF);
                DDV.DDX(bUpdate, this.comboBox11, ref m_sp.D68_1C3_ASCL);
#endif
                //---
                DDV.DDX(bUpdate, this.comboBox12, ref m_ss.D38_410_MSTM);
                DDV.DDX(bUpdate, this.comboBox13, ref m_ss.D38_424_ALG1);
                DDV.DDX(bUpdate, this.comboBox14, ref m_ss.D38_422_ALG2);
                DDV.DDX(bUpdate, this.comboBox15, ref m_ss.D38_420_LEDC);
                DDV.DDX(bUpdate, this.comboBox16, ref m_ss.D38_434_PSG0);
#if false
                //---
                DDV.DDX(bUpdate, this.comboBox17, ref m_sp.D38_410_MSTM[1]);
                DDV.DDX(bUpdate, this.comboBox18, ref m_sp.D38_424_ALG1[1]);
                DDV.DDX(bUpdate, this.comboBox19, ref m_sp.D38_422_ALG2[1]);
                DDV.DDX(bUpdate, this.comboBox20, ref m_sp.D38_420_LEDC[1]);
                DDV.DDX(bUpdate, this.comboBox21, ref m_sp.D38_434_PSG0[1]);
                //---
                DDV.DDX(bUpdate, this.comboBox22, ref m_sp.D38_410_MSTM[2]);
                DDV.DDX(bUpdate, this.comboBox23, ref m_sp.D38_424_ALG1[2]);
                DDV.DDX(bUpdate, this.comboBox24, ref m_sp.D38_422_ALG2[2]);
                DDV.DDX(bUpdate, this.comboBox25, ref m_sp.D38_420_LEDC[2]);
                DDV.DDX(bUpdate, this.comboBox26, ref m_sp.D38_434_PSG0[2]);
                //---
                DDV.DDX(bUpdate, this.numericUpDown2, ref m_duty[0]);
                DDV.DDX(bUpdate, this.numericUpDown3, ref m_duty[1]);
                //---
                DDV.DDX(bUpdate, this.textBox76, ref m_sp.ADC_COF_GRD[1]);
                DDV.DDX(bUpdate, this.textBox1, ref m_sp.ADC_COF_OFS[1]);
                //---
                DDV.DDX(bUpdate, this.textBox3, ref m_sp.ADC_COF_GRD[2]);
                DDV.DDX(bUpdate, this.textBox2, ref m_sp.ADC_COF_OFS[2]);
                //---
                DDV.DDX(bUpdate, this.textBox10, ref m_sp.SEN_COF_GRD[0]);
                DDV.DDX(bUpdate, this.textBox11, ref m_sp.SEN_COF_OFS[0]);
                DDV.DDX(bUpdate, this.textBox12, ref m_sp.SEN_COF_GRD[1]);
                DDV.DDX(bUpdate, this.textBox13, ref m_sp.SEN_COF_OFS[1]);
                DDV.DDX(bUpdate, this.textBox14, ref m_sp.SEN_COF_GRD[2]);
                DDV.DDX(bUpdate, this.textBox15, ref m_sp.SEN_COF_OFS[2]);
                DDV.DDX(bUpdate, this.textBox16, ref m_sp.SEN_COF_GRD[3]);
                DDV.DDX(bUpdate, this.textBox17, ref m_sp.SEN_COF_OFS[3]);
                DDV.DDX(bUpdate, this.textBox18, ref m_sp.SEN_COF_GRD[4]);
                DDV.DDX(bUpdate, this.textBox19, ref m_sp.SEN_COF_OFS[4]);
                DDV.DDX(bUpdate, this.textBox20, ref m_sp.SEN_COF_GRD[5]);
                DDV.DDX(bUpdate, this.textBox21, ref m_sp.SEN_COF_OFS[5]);
                DDV.DDX(bUpdate, this.textBox22, ref m_sp.SEN_COF_GRD[6]);
                DDV.DDX(bUpdate, this.textBox23, ref m_sp.SEN_COF_OFS[6]);
                DDV.DDX(bUpdate, this.textBox24, ref m_sp.SEN_COF_GRD[7]);
                DDV.DDX(bUpdate, this.textBox25, ref m_sp.SEN_COF_OFS[7]);
                DDV.DDX(bUpdate, this.textBox26, ref m_sp.SEN_COF_GRD[8]);
                DDV.DDX(bUpdate, this.textBox27, ref m_sp.SEN_COF_OFS[8]);
                DDV.DDX(bUpdate, this.textBox28, ref m_sp.SEN_COF_GRD[9]);
                DDV.DDX(bUpdate, this.textBox29, ref m_sp.SEN_COF_OFS[9]);
                DDV.DDX(bUpdate, this.textBox30, ref m_sp.SEN_COF_GRD[10]);
                DDV.DDX(bUpdate, this.textBox31, ref m_sp.SEN_COF_OFS[10]);
                DDV.DDX(bUpdate, this.textBox32, ref m_sp.SEN_COF_GRD[11]);
                DDV.DDX(bUpdate, this.textBox33, ref m_sp.SEN_COF_OFS[11]);
                DDV.DDX(bUpdate, this.textBox34, ref m_sp.SEN_COF_GRD[12]);
                DDV.DDX(bUpdate, this.textBox35, ref m_sp.SEN_COF_OFS[12]);
                DDV.DDX(bUpdate, this.textBox36, ref m_sp.SEN_COF_GRD[13]);
                DDV.DDX(bUpdate, this.textBox37, ref m_sp.SEN_COF_OFS[13]);
                DDV.DDX(bUpdate, this.textBox38, ref m_sp.SEN_COF_GRD[14]);
                DDV.DDX(bUpdate, this.textBox39, ref m_sp.SEN_COF_OFS[14]);
                DDV.DDX(bUpdate, this.textBox40, ref m_sp.SEN_COF_GRD[15]);
                DDV.DDX(bUpdate, this.textBox41, ref m_sp.SEN_COF_OFS[15]);
                DDV.DDX(bUpdate, this.textBox42, ref m_sp.SEN_COF_GRD[16]);
                DDV.DDX(bUpdate, this.textBox43, ref m_sp.SEN_COF_OFS[16]);
                DDV.DDX(bUpdate, this.textBox44, ref m_sp.SEN_COF_GRD[17]);
                DDV.DDX(bUpdate, this.textBox45, ref m_sp.SEN_COF_OFS[17]);
                DDV.DDX(bUpdate, this.textBox46, ref m_sp.SEN_COF_GRD[18]);
                DDV.DDX(bUpdate, this.textBox47, ref m_sp.SEN_COF_OFS[18]);
                //ADC基準
                //ADC基準
                DDV.DDX(bUpdate, this.textBox48, ref m_sp.SEN_COF_GRD[20]);                //圧力
                DDV.DDX(bUpdate, this.textBox49, ref m_sp.SEN_COF_OFS[20]);                //圧力
                DDV.DDX(bUpdate, this.textBox50, ref m_sp.SEN_COF_GRD[21]);                //電池
                DDV.DDX(bUpdate, this.textBox51, ref m_sp.SEN_COF_OFS[21]);                //電池
                //-----
#endif
                rc = true;
            }
            catch (Exception e)
            {
                G.mlog(e.Message);
                rc = false;
            }
            return(rc);
        }