Beispiel #1
0
 private void hall_Load(object sender, EventArgs e)
 {
     UploadData.max = 0;
     UploadData.min = 16384 * 10;
     InitTips();
     CommProtocol.SetTraceMode(CommProtocol.TRACE_MODE_PC);
     InitTimer();
 }
Beispiel #2
0
        private void para_Load(object sender, EventArgs e)
        {
            CommProtocol.SetTraceMode(CommProtocol.TRACE_MODE_PC);
            // Refresh data
            textBox1.Text  = UploadData.Kp.ToString();
            textBox5.Text  = UploadData.Ki.ToString();
            textBox8.Text  = UploadData.Ke1.ToString();
            textBox11.Text = UploadData.Ke2.ToString();

            textBox17.Text = UploadData.maxCurrent.ToString();
            textBox14.Text = UploadData.maxDegree.ToString();

            radioButton4.Checked = false;
            radioButton5.Checked = false;
            radioButton3.Checked = false;

            if (UploadData.traceMode == CommProtocol.TRACE_MODE_LOG)
            {
                radioButton5.Checked = true;
            }
            else if (UploadData.traceMode == CommProtocol.TRACE_MODE_PC)
            {
                radioButton4.Checked = true;
            }
            else if (UploadData.traceMode == CommProtocol.TRACE_MODE_NONE)
            {
                radioButton3.Checked = true;
            }

            if (UploadData.run2zero > 0)
            {
                checkBox2.Checked = true;
            }
            if (UploadData.reversse > 0)
            {
                checkBox1.Checked = true;
            }


            InitTips();
        }