瀏覽代碼

增加单力矩和三力矩选择。

Dail 1 年之前
父節點
當前提交
65f84c2eb8

二進制
.vs/MOTINOVA_MC_Test/v17/.suo


+ 173 - 87
MOTINOVA_MC_Test/Form1.Designer.cs

@@ -234,6 +234,7 @@
             this.comboBox_TailLightVol = new System.Windows.Forms.ComboBox();
             this.comboBox_AttiSensor = new System.Windows.Forms.ComboBox();
             this.comboBox_FrontLigthVol = new System.Windows.Forms.ComboBox();
+            this.comboBox_FrontLightMode = new System.Windows.Forms.ComboBox();
             this.comboBox_TailLightMode = new System.Windows.Forms.ComboBox();
             this.button_Write_Config_Ext = new System.Windows.Forms.Button();
             this.button_Read_Config_Ext = new System.Windows.Forms.Button();
@@ -242,6 +243,7 @@
             this.label122 = new System.Windows.Forms.Label();
             this.label65 = new System.Windows.Forms.Label();
             this.textBox_Config_Angle_Roll = new System.Windows.Forms.TextBox();
+            this.label135 = new System.Windows.Forms.Label();
             this.label121 = new System.Windows.Forms.Label();
             this.label64 = new System.Windows.Forms.Label();
             this.textBox_Config_Angle_Pitch = new System.Windows.Forms.TextBox();
@@ -277,8 +279,12 @@
             this.label96 = new System.Windows.Forms.Label();
             this.textBox_Runlog1_MCU_MIN = new System.Windows.Forms.TextBox();
             this.textBox_Runlog1_Coil_MIN = new System.Windows.Forms.TextBox();
+            this.label139 = new System.Windows.Forms.Label();
+            this.textBox_ODO_Time = new System.Windows.Forms.TextBox();
             this.label98 = new System.Windows.Forms.Label();
+            this.label136 = new System.Windows.Forms.Label();
             this.textBox_Runlog1_MCU_MAX = new System.Windows.Forms.TextBox();
+            this.textBox_ODO_Km = new System.Windows.Forms.TextBox();
             this.label97 = new System.Windows.Forms.Label();
             this.textBox_Runlog1_Coil_MAX = new System.Windows.Forms.TextBox();
             this.label95 = new System.Windows.Forms.Label();
@@ -343,6 +349,8 @@
             this.checkBox_Sensor3 = new System.Windows.Forms.CheckBox();
             this.checkBox_Sensor2 = new System.Windows.Forms.CheckBox();
             this.checkBox_Sensor1 = new System.Windows.Forms.CheckBox();
+            this.radioButton_ThreeSensor = new System.Windows.Forms.RadioButton();
+            this.radioButton_SingleSensor = new System.Windows.Forms.RadioButton();
             this.label115 = new System.Windows.Forms.Label();
             this.button_WriteK = new System.Windows.Forms.Button();
             this.button_ReadZero = new System.Windows.Forms.Button();
@@ -378,8 +386,6 @@
             this.textBox_DebugAddrBegin = new System.Windows.Forms.TextBox();
             this.label137 = new System.Windows.Forms.Label();
             this.label138 = new System.Windows.Forms.Label();
-            this.label135 = new System.Windows.Forms.Label();
-            this.comboBox_FrontLightMode = new System.Windows.Forms.ComboBox();
             this.groupBox1.SuspendLayout();
             this.groupBox2.SuspendLayout();
             this.groupBox3.SuspendLayout();
@@ -863,7 +869,7 @@
             this.label54.Name = "label54";
             this.label54.Size = new System.Drawing.Size(70, 20);
             this.label54.TabIndex = 2;
-            this.label54.Text = "MCU温度";
+            this.label54.Text = "MOS温度";
             // 
             // label37
             // 
@@ -2485,7 +2491,7 @@
             // 
             // groupBox4
             // 
-            this.groupBox4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(180)))), ((int)(((byte)(120)))));
+            this.groupBox4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(46)))), ((int)(((byte)(193)))), ((int)(((byte)(144)))));
             this.groupBox4.Controls.Add(this.textBox_Config_SpeedlimitAdj);
             this.groupBox4.Controls.Add(this.label133);
             this.groupBox4.Controls.Add(this.textBox_Config_SpeedlimitStop);
@@ -2515,7 +2521,7 @@
             this.groupBox4.Controls.Add(this.label64);
             this.groupBox4.Controls.Add(this.textBox_Config_Angle_Pitch);
             this.groupBox4.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.groupBox4.Location = new System.Drawing.Point(580, 343);
+            this.groupBox4.Location = new System.Drawing.Point(581, 343);
             this.groupBox4.Name = "groupBox4";
             this.groupBox4.Size = new System.Drawing.Size(168, 443);
             this.groupBox4.TabIndex = 10;
@@ -2668,6 +2674,17 @@
             this.comboBox_FrontLigthVol.Size = new System.Drawing.Size(70, 28);
             this.comboBox_FrontLigthVol.TabIndex = 9;
             // 
+            // comboBox_FrontLightMode
+            // 
+            this.comboBox_FrontLightMode.FormattingEnabled = true;
+            this.comboBox_FrontLightMode.Items.AddRange(new object[] {
+            "模式1",
+            "模式2"});
+            this.comboBox_FrontLightMode.Location = new System.Drawing.Point(94, 102);
+            this.comboBox_FrontLightMode.Name = "comboBox_FrontLightMode";
+            this.comboBox_FrontLightMode.Size = new System.Drawing.Size(70, 28);
+            this.comboBox_FrontLightMode.TabIndex = 8;
+            // 
             // comboBox_TailLightMode
             // 
             this.comboBox_TailLightMode.FormattingEnabled = true;
@@ -2754,6 +2771,16 @@
             this.textBox_Config_Angle_Roll.Size = new System.Drawing.Size(70, 26);
             this.textBox_Config_Angle_Roll.TabIndex = 2;
             // 
+            // label135
+            // 
+            this.label135.AutoSize = true;
+            this.label135.Location = new System.Drawing.Point(9, 106);
+            this.label135.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.label135.Name = "label135";
+            this.label135.Size = new System.Drawing.Size(65, 20);
+            this.label135.TabIndex = 2;
+            this.label135.Text = "前灯模式";
+            // 
             // label121
             // 
             this.label121.AutoSize = true;
@@ -2806,6 +2833,8 @@
             // checkBox_ReadRideInfo
             // 
             this.checkBox_ReadRideInfo.AutoSize = true;
+            this.checkBox_ReadRideInfo.Checked = true;
+            this.checkBox_ReadRideInfo.CheckState = System.Windows.Forms.CheckState.Checked;
             this.checkBox_ReadRideInfo.Location = new System.Drawing.Point(102, 155);
             this.checkBox_ReadRideInfo.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
             this.checkBox_ReadRideInfo.Name = "checkBox_ReadRideInfo";
@@ -3061,8 +3090,12 @@
             this.groupBox14.Controls.Add(this.label96);
             this.groupBox14.Controls.Add(this.textBox_Runlog1_MCU_MIN);
             this.groupBox14.Controls.Add(this.textBox_Runlog1_Coil_MIN);
+            this.groupBox14.Controls.Add(this.label139);
+            this.groupBox14.Controls.Add(this.textBox_ODO_Time);
             this.groupBox14.Controls.Add(this.label98);
+            this.groupBox14.Controls.Add(this.label136);
             this.groupBox14.Controls.Add(this.textBox_Runlog1_MCU_MAX);
+            this.groupBox14.Controls.Add(this.textBox_ODO_Km);
             this.groupBox14.Controls.Add(this.label97);
             this.groupBox14.Controls.Add(this.textBox_Runlog1_Coil_MAX);
             this.groupBox14.Controls.Add(this.label95);
@@ -3127,16 +3160,16 @@
             // label99
             // 
             this.label99.AutoSize = true;
-            this.label99.Location = new System.Drawing.Point(152, 399);
+            this.label99.Location = new System.Drawing.Point(152, 373);
             this.label99.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label99.Name = "label99";
             this.label99.Size = new System.Drawing.Size(84, 20);
             this.label99.TabIndex = 3;
-            this.label99.Text = "MCU最低温";
+            this.label99.Text = "MOS最低温";
             // 
             // button_ReadErrorLog
             // 
-            this.button_ReadErrorLog.Location = new System.Drawing.Point(193, 458);
+            this.button_ReadErrorLog.Location = new System.Drawing.Point(230, 464);
             this.button_ReadErrorLog.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
             this.button_ReadErrorLog.Name = "button_ReadErrorLog";
             this.button_ReadErrorLog.Size = new System.Drawing.Size(80, 35);
@@ -3148,10 +3181,10 @@
             // 
             // button_ReadRunLog
             // 
-            this.button_ReadRunLog.Location = new System.Drawing.Point(43, 458);
+            this.button_ReadRunLog.Location = new System.Drawing.Point(156, 464);
             this.button_ReadRunLog.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
             this.button_ReadRunLog.Name = "button_ReadRunLog";
-            this.button_ReadRunLog.Size = new System.Drawing.Size(80, 35);
+            this.button_ReadRunLog.Size = new System.Drawing.Size(70, 35);
             this.button_ReadRunLog.TabIndex = 2;
             this.button_ReadRunLog.Text = "查询";
             this.button_ReadRunLog.UseVisualStyleBackColor = true;
@@ -3160,7 +3193,7 @@
             // label96
             // 
             this.label96.AutoSize = true;
-            this.label96.Location = new System.Drawing.Point(152, 343);
+            this.label96.Location = new System.Drawing.Point(152, 321);
             this.label96.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label96.Name = "label96";
             this.label96.Size = new System.Drawing.Size(79, 20);
@@ -3169,7 +3202,7 @@
             // 
             // textBox_Runlog1_MCU_MIN
             // 
-            this.textBox_Runlog1_MCU_MIN.Location = new System.Drawing.Point(247, 396);
+            this.textBox_Runlog1_MCU_MIN.Location = new System.Drawing.Point(247, 370);
             this.textBox_Runlog1_MCU_MIN.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
             this.textBox_Runlog1_MCU_MIN.Name = "textBox_Runlog1_MCU_MIN";
             this.textBox_Runlog1_MCU_MIN.ReadOnly = true;
@@ -3178,36 +3211,74 @@
             // 
             // textBox_Runlog1_Coil_MIN
             // 
-            this.textBox_Runlog1_Coil_MIN.Location = new System.Drawing.Point(247, 340);
+            this.textBox_Runlog1_Coil_MIN.Location = new System.Drawing.Point(247, 318);
             this.textBox_Runlog1_Coil_MIN.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
             this.textBox_Runlog1_Coil_MIN.Name = "textBox_Runlog1_Coil_MIN";
             this.textBox_Runlog1_Coil_MIN.ReadOnly = true;
             this.textBox_Runlog1_Coil_MIN.Size = new System.Drawing.Size(60, 26);
             this.textBox_Runlog1_Coil_MIN.TabIndex = 4;
             // 
+            // label139
+            // 
+            this.label139.AutoSize = true;
+            this.label139.Location = new System.Drawing.Point(6, 425);
+            this.label139.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.label139.Name = "label139";
+            this.label139.Size = new System.Drawing.Size(70, 20);
+            this.label139.TabIndex = 2;
+            this.label139.Text = "ODO时间";
+            // 
+            // textBox_ODO_Time
+            // 
+            this.textBox_ODO_Time.Location = new System.Drawing.Point(90, 422);
+            this.textBox_ODO_Time.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
+            this.textBox_ODO_Time.Name = "textBox_ODO_Time";
+            this.textBox_ODO_Time.ReadOnly = true;
+            this.textBox_ODO_Time.Size = new System.Drawing.Size(60, 26);
+            this.textBox_ODO_Time.TabIndex = 2;
+            // 
             // label98
             // 
             this.label98.AutoSize = true;
-            this.label98.Location = new System.Drawing.Point(152, 371);
+            this.label98.Location = new System.Drawing.Point(152, 347);
             this.label98.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label98.Name = "label98";
             this.label98.Size = new System.Drawing.Size(84, 20);
             this.label98.TabIndex = 5;
-            this.label98.Text = "MCU最高温";
+            this.label98.Text = "MOS最高温";
+            // 
+            // label136
+            // 
+            this.label136.AutoSize = true;
+            this.label136.Location = new System.Drawing.Point(152, 399);
+            this.label136.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.label136.Name = "label136";
+            this.label136.Size = new System.Drawing.Size(70, 20);
+            this.label136.TabIndex = 2;
+            this.label136.Text = "ODO里程";
             // 
             // textBox_Runlog1_MCU_MAX
             // 
-            this.textBox_Runlog1_MCU_MAX.Location = new System.Drawing.Point(247, 368);
+            this.textBox_Runlog1_MCU_MAX.Location = new System.Drawing.Point(247, 344);
             this.textBox_Runlog1_MCU_MAX.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
             this.textBox_Runlog1_MCU_MAX.Name = "textBox_Runlog1_MCU_MAX";
             this.textBox_Runlog1_MCU_MAX.ReadOnly = true;
             this.textBox_Runlog1_MCU_MAX.Size = new System.Drawing.Size(60, 26);
             this.textBox_Runlog1_MCU_MAX.TabIndex = 6;
             // 
+            // textBox_ODO_Km
+            // 
+            this.textBox_ODO_Km.Location = new System.Drawing.Point(247, 396);
+            this.textBox_ODO_Km.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
+            this.textBox_ODO_Km.Name = "textBox_ODO_Km";
+            this.textBox_ODO_Km.ReadOnly = true;
+            this.textBox_ODO_Km.Size = new System.Drawing.Size(60, 26);
+            this.textBox_ODO_Km.TabIndex = 2;
+            // 
             // label97
             // 
             this.label97.AutoSize = true;
-            this.label97.Location = new System.Drawing.Point(152, 315);
+            this.label97.Location = new System.Drawing.Point(152, 295);
             this.label97.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label97.Name = "label97";
             this.label97.Size = new System.Drawing.Size(79, 20);
@@ -3216,7 +3287,7 @@
             // 
             // textBox_Runlog1_Coil_MAX
             // 
-            this.textBox_Runlog1_Coil_MAX.Location = new System.Drawing.Point(247, 312);
+            this.textBox_Runlog1_Coil_MAX.Location = new System.Drawing.Point(247, 292);
             this.textBox_Runlog1_Coil_MAX.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
             this.textBox_Runlog1_Coil_MAX.Name = "textBox_Runlog1_Coil_MAX";
             this.textBox_Runlog1_Coil_MAX.ReadOnly = true;
@@ -3226,7 +3297,7 @@
             // label95
             // 
             this.label95.AutoSize = true;
-            this.label95.Location = new System.Drawing.Point(152, 287);
+            this.label95.Location = new System.Drawing.Point(152, 269);
             this.label95.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label95.Name = "label95";
             this.label95.Size = new System.Drawing.Size(78, 20);
@@ -3235,7 +3306,7 @@
             // 
             // textBox_Runlog1_PCB_MIN
             // 
-            this.textBox_Runlog1_PCB_MIN.Location = new System.Drawing.Point(247, 284);
+            this.textBox_Runlog1_PCB_MIN.Location = new System.Drawing.Point(247, 266);
             this.textBox_Runlog1_PCB_MIN.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
             this.textBox_Runlog1_PCB_MIN.Name = "textBox_Runlog1_PCB_MIN";
             this.textBox_Runlog1_PCB_MIN.ReadOnly = true;
@@ -3245,7 +3316,7 @@
             // label94
             // 
             this.label94.AutoSize = true;
-            this.label94.Location = new System.Drawing.Point(152, 259);
+            this.label94.Location = new System.Drawing.Point(152, 243);
             this.label94.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label94.Name = "label94";
             this.label94.Size = new System.Drawing.Size(78, 20);
@@ -3254,7 +3325,7 @@
             // 
             // textBox_Runlog1_PCB_MAX
             // 
-            this.textBox_Runlog1_PCB_MAX.Location = new System.Drawing.Point(247, 256);
+            this.textBox_Runlog1_PCB_MAX.Location = new System.Drawing.Point(247, 240);
             this.textBox_Runlog1_PCB_MAX.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
             this.textBox_Runlog1_PCB_MAX.Name = "textBox_Runlog1_PCB_MAX";
             this.textBox_Runlog1_PCB_MAX.ReadOnly = true;
@@ -3264,7 +3335,7 @@
             // label93
             // 
             this.label93.AutoSize = true;
-            this.label93.Location = new System.Drawing.Point(6, 427);
+            this.label93.Location = new System.Drawing.Point(6, 399);
             this.label93.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label93.Name = "label93";
             this.label93.Size = new System.Drawing.Size(79, 20);
@@ -3273,7 +3344,7 @@
             // 
             // textBox_Runlog1_PBUFault
             // 
-            this.textBox_Runlog1_PBUFault.Location = new System.Drawing.Point(90, 424);
+            this.textBox_Runlog1_PBUFault.Location = new System.Drawing.Point(90, 396);
             this.textBox_Runlog1_PBUFault.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
             this.textBox_Runlog1_PBUFault.Name = "textBox_Runlog1_PBUFault";
             this.textBox_Runlog1_PBUFault.ReadOnly = true;
@@ -3283,7 +3354,7 @@
             // label92
             // 
             this.label92.AutoSize = true;
-            this.label92.Location = new System.Drawing.Point(6, 399);
+            this.label92.Location = new System.Drawing.Point(6, 373);
             this.label92.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label92.Name = "label92";
             this.label92.Size = new System.Drawing.Size(80, 20);
@@ -3292,7 +3363,7 @@
             // 
             // textBox_Runlog1_HMIFault
             // 
-            this.textBox_Runlog1_HMIFault.Location = new System.Drawing.Point(90, 396);
+            this.textBox_Runlog1_HMIFault.Location = new System.Drawing.Point(90, 370);
             this.textBox_Runlog1_HMIFault.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
             this.textBox_Runlog1_HMIFault.Name = "textBox_Runlog1_HMIFault";
             this.textBox_Runlog1_HMIFault.ReadOnly = true;
@@ -3302,7 +3373,7 @@
             // label91
             // 
             this.label91.AutoSize = true;
-            this.label91.Location = new System.Drawing.Point(6, 371);
+            this.label91.Location = new System.Drawing.Point(6, 347);
             this.label91.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label91.Name = "label91";
             this.label91.Size = new System.Drawing.Size(82, 20);
@@ -3311,7 +3382,7 @@
             // 
             // textBox_Runlog1_BMSFault
             // 
-            this.textBox_Runlog1_BMSFault.Location = new System.Drawing.Point(90, 368);
+            this.textBox_Runlog1_BMSFault.Location = new System.Drawing.Point(90, 344);
             this.textBox_Runlog1_BMSFault.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
             this.textBox_Runlog1_BMSFault.Name = "textBox_Runlog1_BMSFault";
             this.textBox_Runlog1_BMSFault.ReadOnly = true;
@@ -3321,7 +3392,7 @@
             // label90
             // 
             this.label90.AutoSize = true;
-            this.label90.Location = new System.Drawing.Point(5, 343);
+            this.label90.Location = new System.Drawing.Point(5, 321);
             this.label90.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label90.Name = "label90";
             this.label90.Size = new System.Drawing.Size(65, 20);
@@ -3330,7 +3401,7 @@
             // 
             // textBox_Runlog1_NTCFault
             // 
-            this.textBox_Runlog1_NTCFault.Location = new System.Drawing.Point(90, 340);
+            this.textBox_Runlog1_NTCFault.Location = new System.Drawing.Point(90, 318);
             this.textBox_Runlog1_NTCFault.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
             this.textBox_Runlog1_NTCFault.Name = "textBox_Runlog1_NTCFault";
             this.textBox_Runlog1_NTCFault.ReadOnly = true;
@@ -3340,7 +3411,7 @@
             // label89
             // 
             this.label89.AutoSize = true;
-            this.label89.Location = new System.Drawing.Point(5, 315);
+            this.label89.Location = new System.Drawing.Point(5, 295);
             this.label89.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label89.Name = "label89";
             this.label89.Size = new System.Drawing.Size(65, 20);
@@ -3349,7 +3420,7 @@
             // 
             // textBox_Runlog1_Phase
             // 
-            this.textBox_Runlog1_Phase.Location = new System.Drawing.Point(90, 312);
+            this.textBox_Runlog1_Phase.Location = new System.Drawing.Point(90, 292);
             this.textBox_Runlog1_Phase.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
             this.textBox_Runlog1_Phase.Name = "textBox_Runlog1_Phase";
             this.textBox_Runlog1_Phase.ReadOnly = true;
@@ -3359,7 +3430,7 @@
             // label88
             // 
             this.label88.AutoSize = true;
-            this.label88.Location = new System.Drawing.Point(5, 287);
+            this.label88.Location = new System.Drawing.Point(5, 269);
             this.label88.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label88.Name = "label88";
             this.label88.Size = new System.Drawing.Size(65, 20);
@@ -3368,7 +3439,7 @@
             // 
             // textBox_Runlog1_HallFault
             // 
-            this.textBox_Runlog1_HallFault.Location = new System.Drawing.Point(90, 284);
+            this.textBox_Runlog1_HallFault.Location = new System.Drawing.Point(90, 266);
             this.textBox_Runlog1_HallFault.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
             this.textBox_Runlog1_HallFault.Name = "textBox_Runlog1_HallFault";
             this.textBox_Runlog1_HallFault.ReadOnly = true;
@@ -3378,7 +3449,7 @@
             // label87
             // 
             this.label87.AutoSize = true;
-            this.label87.Location = new System.Drawing.Point(5, 259);
+            this.label87.Location = new System.Drawing.Point(5, 243);
             this.label87.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label87.Name = "label87";
             this.label87.Size = new System.Drawing.Size(64, 20);
@@ -3387,7 +3458,7 @@
             // 
             // textBox_Runlog1_TQSFault
             // 
-            this.textBox_Runlog1_TQSFault.Location = new System.Drawing.Point(90, 256);
+            this.textBox_Runlog1_TQSFault.Location = new System.Drawing.Point(90, 240);
             this.textBox_Runlog1_TQSFault.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
             this.textBox_Runlog1_TQSFault.Name = "textBox_Runlog1_TQSFault";
             this.textBox_Runlog1_TQSFault.ReadOnly = true;
@@ -3397,7 +3468,7 @@
             // label86
             // 
             this.label86.AutoSize = true;
-            this.label86.Location = new System.Drawing.Point(5, 231);
+            this.label86.Location = new System.Drawing.Point(5, 217);
             this.label86.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label86.Name = "label86";
             this.label86.Size = new System.Drawing.Size(62, 20);
@@ -3406,7 +3477,7 @@
             // 
             // textBox_Runlog1_SPSFault
             // 
-            this.textBox_Runlog1_SPSFault.Location = new System.Drawing.Point(90, 228);
+            this.textBox_Runlog1_SPSFault.Location = new System.Drawing.Point(90, 214);
             this.textBox_Runlog1_SPSFault.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
             this.textBox_Runlog1_SPSFault.Name = "textBox_Runlog1_SPSFault";
             this.textBox_Runlog1_SPSFault.ReadOnly = true;
@@ -3416,7 +3487,7 @@
             // label85
             // 
             this.label85.AutoSize = true;
-            this.label85.Location = new System.Drawing.Point(5, 203);
+            this.label85.Location = new System.Drawing.Point(5, 191);
             this.label85.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label85.Name = "label85";
             this.label85.Size = new System.Drawing.Size(65, 20);
@@ -3425,7 +3496,7 @@
             // 
             // textBox_Runlog1_OT
             // 
-            this.textBox_Runlog1_OT.Location = new System.Drawing.Point(90, 200);
+            this.textBox_Runlog1_OT.Location = new System.Drawing.Point(90, 188);
             this.textBox_Runlog1_OT.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
             this.textBox_Runlog1_OT.Name = "textBox_Runlog1_OT";
             this.textBox_Runlog1_OT.ReadOnly = true;
@@ -3435,7 +3506,7 @@
             // label84
             // 
             this.label84.AutoSize = true;
-            this.label84.Location = new System.Drawing.Point(5, 176);
+            this.label84.Location = new System.Drawing.Point(5, 166);
             this.label84.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label84.Name = "label84";
             this.label84.Size = new System.Drawing.Size(65, 20);
@@ -3444,7 +3515,7 @@
             // 
             // textBox_Runlog1_Lock
             // 
-            this.textBox_Runlog1_Lock.Location = new System.Drawing.Point(90, 172);
+            this.textBox_Runlog1_Lock.Location = new System.Drawing.Point(90, 162);
             this.textBox_Runlog1_Lock.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
             this.textBox_Runlog1_Lock.Name = "textBox_Runlog1_Lock";
             this.textBox_Runlog1_Lock.ReadOnly = true;
@@ -3454,7 +3525,7 @@
             // label83
             // 
             this.label83.AutoSize = true;
-            this.label83.Location = new System.Drawing.Point(5, 147);
+            this.label83.Location = new System.Drawing.Point(5, 139);
             this.label83.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label83.Name = "label83";
             this.label83.Size = new System.Drawing.Size(65, 20);
@@ -3463,7 +3534,7 @@
             // 
             // textBox_Runlog1_OV
             // 
-            this.textBox_Runlog1_OV.Location = new System.Drawing.Point(90, 144);
+            this.textBox_Runlog1_OV.Location = new System.Drawing.Point(90, 136);
             this.textBox_Runlog1_OV.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
             this.textBox_Runlog1_OV.Name = "textBox_Runlog1_OV";
             this.textBox_Runlog1_OV.ReadOnly = true;
@@ -3473,7 +3544,7 @@
             // label82
             // 
             this.label82.AutoSize = true;
-            this.label82.Location = new System.Drawing.Point(5, 119);
+            this.label82.Location = new System.Drawing.Point(5, 113);
             this.label82.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label82.Name = "label82";
             this.label82.Size = new System.Drawing.Size(65, 20);
@@ -3482,7 +3553,7 @@
             // 
             // textBox_Runlog1_UV
             // 
-            this.textBox_Runlog1_UV.Location = new System.Drawing.Point(90, 116);
+            this.textBox_Runlog1_UV.Location = new System.Drawing.Point(90, 110);
             this.textBox_Runlog1_UV.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
             this.textBox_Runlog1_UV.Name = "textBox_Runlog1_UV";
             this.textBox_Runlog1_UV.ReadOnly = true;
@@ -3492,7 +3563,7 @@
             // label81
             // 
             this.label81.AutoSize = true;
-            this.label81.Location = new System.Drawing.Point(5, 91);
+            this.label81.Location = new System.Drawing.Point(5, 87);
             this.label81.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label81.Name = "label81";
             this.label81.Size = new System.Drawing.Size(65, 20);
@@ -3501,7 +3572,7 @@
             // 
             // textBox_Runlog1_OC
             // 
-            this.textBox_Runlog1_OC.Location = new System.Drawing.Point(90, 88);
+            this.textBox_Runlog1_OC.Location = new System.Drawing.Point(90, 84);
             this.textBox_Runlog1_OC.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
             this.textBox_Runlog1_OC.Name = "textBox_Runlog1_OC";
             this.textBox_Runlog1_OC.ReadOnly = true;
@@ -3511,7 +3582,7 @@
             // label80
             // 
             this.label80.AutoSize = true;
-            this.label80.Location = new System.Drawing.Point(5, 63);
+            this.label80.Location = new System.Drawing.Point(5, 61);
             this.label80.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label80.Name = "label80";
             this.label80.Size = new System.Drawing.Size(65, 20);
@@ -3520,7 +3591,7 @@
             // 
             // textBox_Runlog1_RunTime
             // 
-            this.textBox_Runlog1_RunTime.Location = new System.Drawing.Point(90, 60);
+            this.textBox_Runlog1_RunTime.Location = new System.Drawing.Point(90, 58);
             this.textBox_Runlog1_RunTime.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
             this.textBox_Runlog1_RunTime.Name = "textBox_Runlog1_RunTime";
             this.textBox_Runlog1_RunTime.ReadOnly = true;
@@ -3530,7 +3601,7 @@
             // label107
             // 
             this.label107.AutoSize = true;
-            this.label107.Location = new System.Drawing.Point(152, 231);
+            this.label107.Location = new System.Drawing.Point(152, 217);
             this.label107.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label107.Name = "label107";
             this.label107.Size = new System.Drawing.Size(81, 20);
@@ -3539,7 +3610,7 @@
             // 
             // textBox_Runlog2_TE_CircuitFault
             // 
-            this.textBox_Runlog2_TE_CircuitFault.Location = new System.Drawing.Point(247, 228);
+            this.textBox_Runlog2_TE_CircuitFault.Location = new System.Drawing.Point(247, 214);
             this.textBox_Runlog2_TE_CircuitFault.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
             this.textBox_Runlog2_TE_CircuitFault.Name = "textBox_Runlog2_TE_CircuitFault";
             this.textBox_Runlog2_TE_CircuitFault.ReadOnly = true;
@@ -3549,7 +3620,7 @@
             // label106
             // 
             this.label106.AutoSize = true;
-            this.label106.Location = new System.Drawing.Point(152, 203);
+            this.label106.Location = new System.Drawing.Point(152, 191);
             this.label106.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label106.Name = "label106";
             this.label106.Size = new System.Drawing.Size(92, 20);
@@ -3558,7 +3629,7 @@
             // 
             // textBox_Runlog2_TE_MCUFault
             // 
-            this.textBox_Runlog2_TE_MCUFault.Location = new System.Drawing.Point(247, 200);
+            this.textBox_Runlog2_TE_MCUFault.Location = new System.Drawing.Point(247, 188);
             this.textBox_Runlog2_TE_MCUFault.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
             this.textBox_Runlog2_TE_MCUFault.Name = "textBox_Runlog2_TE_MCUFault";
             this.textBox_Runlog2_TE_MCUFault.ReadOnly = true;
@@ -3568,7 +3639,7 @@
             // label105
             // 
             this.label105.AutoSize = true;
-            this.label105.Location = new System.Drawing.Point(152, 175);
+            this.label105.Location = new System.Drawing.Point(152, 165);
             this.label105.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label105.Name = "label105";
             this.label105.Size = new System.Drawing.Size(65, 20);
@@ -3577,7 +3648,7 @@
             // 
             // textBox_Runlog2_CircuitFault
             // 
-            this.textBox_Runlog2_CircuitFault.Location = new System.Drawing.Point(247, 172);
+            this.textBox_Runlog2_CircuitFault.Location = new System.Drawing.Point(247, 162);
             this.textBox_Runlog2_CircuitFault.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
             this.textBox_Runlog2_CircuitFault.Name = "textBox_Runlog2_CircuitFault";
             this.textBox_Runlog2_CircuitFault.ReadOnly = true;
@@ -3587,7 +3658,7 @@
             // label104
             // 
             this.label104.AutoSize = true;
-            this.label104.Location = new System.Drawing.Point(152, 147);
+            this.label104.Location = new System.Drawing.Point(152, 139);
             this.label104.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label104.Name = "label104";
             this.label104.Size = new System.Drawing.Size(65, 20);
@@ -3596,7 +3667,7 @@
             // 
             // textBox_Runlog2_VolFault
             // 
-            this.textBox_Runlog2_VolFault.Location = new System.Drawing.Point(247, 144);
+            this.textBox_Runlog2_VolFault.Location = new System.Drawing.Point(247, 136);
             this.textBox_Runlog2_VolFault.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
             this.textBox_Runlog2_VolFault.Name = "textBox_Runlog2_VolFault";
             this.textBox_Runlog2_VolFault.ReadOnly = true;
@@ -3606,7 +3677,7 @@
             // label103
             // 
             this.label103.AutoSize = true;
-            this.label103.Location = new System.Drawing.Point(152, 119);
+            this.label103.Location = new System.Drawing.Point(152, 113);
             this.label103.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label103.Name = "label103";
             this.label103.Size = new System.Drawing.Size(70, 20);
@@ -3615,7 +3686,7 @@
             // 
             // textBox_Runlog2_MOS_SC
             // 
-            this.textBox_Runlog2_MOS_SC.Location = new System.Drawing.Point(247, 116);
+            this.textBox_Runlog2_MOS_SC.Location = new System.Drawing.Point(247, 110);
             this.textBox_Runlog2_MOS_SC.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
             this.textBox_Runlog2_MOS_SC.Name = "textBox_Runlog2_MOS_SC";
             this.textBox_Runlog2_MOS_SC.ReadOnly = true;
@@ -3625,7 +3696,7 @@
             // label102
             // 
             this.label102.AutoSize = true;
-            this.label102.Location = new System.Drawing.Point(152, 91);
+            this.label102.Location = new System.Drawing.Point(152, 87);
             this.label102.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label102.Name = "label102";
             this.label102.Size = new System.Drawing.Size(65, 20);
@@ -3634,7 +3705,7 @@
             // 
             // textBox_Runlog2_GasFault
             // 
-            this.textBox_Runlog2_GasFault.Location = new System.Drawing.Point(247, 88);
+            this.textBox_Runlog2_GasFault.Location = new System.Drawing.Point(247, 84);
             this.textBox_Runlog2_GasFault.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
             this.textBox_Runlog2_GasFault.Name = "textBox_Runlog2_GasFault";
             this.textBox_Runlog2_GasFault.ReadOnly = true;
@@ -3644,7 +3715,7 @@
             // label101
             // 
             this.label101.AutoSize = true;
-            this.label101.Location = new System.Drawing.Point(152, 63);
+            this.label101.Location = new System.Drawing.Point(152, 61);
             this.label101.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label101.Name = "label101";
             this.label101.Size = new System.Drawing.Size(65, 20);
@@ -3653,7 +3724,7 @@
             // 
             // textBox_Runlog2_CDSFault
             // 
-            this.textBox_Runlog2_CDSFault.Location = new System.Drawing.Point(247, 60);
+            this.textBox_Runlog2_CDSFault.Location = new System.Drawing.Point(247, 58);
             this.textBox_Runlog2_CDSFault.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
             this.textBox_Runlog2_CDSFault.Name = "textBox_Runlog2_CDSFault";
             this.textBox_Runlog2_CDSFault.ReadOnly = true;
@@ -3794,6 +3865,8 @@
             this.groupBox17.Controls.Add(this.checkBox_Sensor3);
             this.groupBox17.Controls.Add(this.checkBox_Sensor2);
             this.groupBox17.Controls.Add(this.checkBox_Sensor1);
+            this.groupBox17.Controls.Add(this.radioButton_ThreeSensor);
+            this.groupBox17.Controls.Add(this.radioButton_SingleSensor);
             this.groupBox17.Controls.Add(this.label115);
             this.groupBox17.Controls.Add(this.button_WriteK);
             this.groupBox17.Controls.Add(this.button_ReadZero);
@@ -3854,6 +3927,34 @@
             this.checkBox_Sensor1.Text = "选择";
             this.checkBox_Sensor1.UseVisualStyleBackColor = true;
             // 
+            // radioButton_ThreeSensor
+            // 
+            this.radioButton_ThreeSensor.AutoSize = true;
+            this.radioButton_ThreeSensor.Checked = true;
+            this.radioButton_ThreeSensor.Location = new System.Drawing.Point(423, 14);
+            this.radioButton_ThreeSensor.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
+            this.radioButton_ThreeSensor.Name = "radioButton_ThreeSensor";
+            this.radioButton_ThreeSensor.Size = new System.Drawing.Size(69, 24);
+            this.radioButton_ThreeSensor.TabIndex = 6;
+            this.radioButton_ThreeSensor.TabStop = true;
+            this.radioButton_ThreeSensor.Text = "三力矩";
+            this.radioButton_ThreeSensor.UseVisualStyleBackColor = true;
+            this.radioButton_ThreeSensor.CheckedChanged += new System.EventHandler(this.radioButton_ThreeSensor_CheckedChanged);
+            this.radioButton_ThreeSensor.Click += new System.EventHandler(this.radioButton_Gear_TURBO_Click);
+            // 
+            // radioButton_SingleSensor
+            // 
+            this.radioButton_SingleSensor.AutoSize = true;
+            this.radioButton_SingleSensor.Location = new System.Drawing.Point(342, 14);
+            this.radioButton_SingleSensor.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
+            this.radioButton_SingleSensor.Name = "radioButton_SingleSensor";
+            this.radioButton_SingleSensor.Size = new System.Drawing.Size(69, 24);
+            this.radioButton_SingleSensor.TabIndex = 6;
+            this.radioButton_SingleSensor.Text = "单力矩";
+            this.radioButton_SingleSensor.UseVisualStyleBackColor = true;
+            this.radioButton_SingleSensor.CheckedChanged += new System.EventHandler(this.radioButton_SingleSensor_CheckedChanged);
+            this.radioButton_SingleSensor.Click += new System.EventHandler(this.radioButton_Gear_TURBO_Click);
+            // 
             // label115
             // 
             this.label115.AutoSize = true;
@@ -4217,32 +4318,11 @@
             this.label138.TabIndex = 2;
             this.label138.Text = "起始地址";
             // 
-            // label135
-            // 
-            this.label135.AutoSize = true;
-            this.label135.Location = new System.Drawing.Point(9, 107);
-            this.label135.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
-            this.label135.Name = "label135";
-            this.label135.Size = new System.Drawing.Size(65, 20);
-            this.label135.TabIndex = 2;
-            this.label135.Text = "前灯模式";
-            // 
-            // comboBox_FrontLightMode
-            // 
-            this.comboBox_FrontLightMode.FormattingEnabled = true;
-            this.comboBox_FrontLightMode.Items.AddRange(new object[] {
-            "模式1",
-            "模式2"});
-            this.comboBox_FrontLightMode.Location = new System.Drawing.Point(94, 102);
-            this.comboBox_FrontLightMode.Name = "comboBox_FrontLightMode";
-            this.comboBox_FrontLightMode.Size = new System.Drawing.Size(70, 28);
-            this.comboBox_FrontLightMode.TabIndex = 8;
-            // 
             // Form1
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(180)))), ((int)(((byte)(120)))));
+            this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(46)))), ((int)(((byte)(193)))), ((int)(((byte)(144)))));
             this.ClientSize = new System.Drawing.Size(1394, 792);
             this.Controls.Add(this.groupBox18);
             this.Controls.Add(this.button_ReadAll);
@@ -4276,7 +4356,7 @@
             this.MaximizeBox = false;
             this.Name = "Form1";
             this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
-            this.Text = "MOTINOVA中置电机配置软件V2.1.7(内部使用)";
+            this.Text = "MOTINOVA中置电机配置软件V3.0.0(内部使用)";
             this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing);
             this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.Form1_FormClosed);
             this.Load += new System.EventHandler(this.Form1_Load);
@@ -4673,6 +4753,12 @@
         private System.Windows.Forms.TextBox textBox_BuildTime;
         private System.Windows.Forms.ComboBox comboBox_FrontLightMode;
         private System.Windows.Forms.Label label135;
+        private System.Windows.Forms.Label label139;
+        private System.Windows.Forms.TextBox textBox_ODO_Time;
+        private System.Windows.Forms.Label label136;
+        private System.Windows.Forms.TextBox textBox_ODO_Km;
+        private System.Windows.Forms.RadioButton radioButton_ThreeSensor;
+        private System.Windows.Forms.RadioButton radioButton_SingleSensor;
     }
 }
 

+ 186 - 81
MOTINOVA_MC_Test/Form1.cs

@@ -480,81 +480,106 @@ namespace MOTINOVA_MC_Test
         //发送力矩传感器校正系数
         private void button_WriteK_Click(object sender, EventArgs e)
         {
-            var K = new byte[2];
-            ushort DataTemp;
-
-            if ((checkBox_Sensor1.Checked == false) && (checkBox_Sensor2.Checked == false) && (checkBox_Sensor3.Checked == false))
+            if (radioButton_SingleSensor.Checked)
             {
-                timer1.Enabled = false;
-                MessageBox.Show("请选择传感器", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
-                timer1.Enabled = true;
-                return;
+                var K = new byte[1];
+                ushort DataTemp;
+
+                DataTemp = (ushort)(decimal.Parse(textBox_Sensor1_K.Text) * 100);
+                K[0] = Convert.ToByte(DataTemp);
+
+                SendCmd((ushort)0x751, (byte)0x16, (ushort)0x2A01, K);
             }
-            else
+            else if (radioButton_ThreeSensor.Checked)
             {
-                if (MessageBox.Show("确认写入", "确认写入?", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
+                var K = new byte[2];
+                ushort DataTemp;
+
+                if ((checkBox_Sensor1.Checked == false) && (checkBox_Sensor2.Checked == false) && (checkBox_Sensor3.Checked == false))
                 {
-                    if (checkBox_Sensor1.Checked == true)
+                    timer1.Enabled = false;
+                    MessageBox.Show("请选择传感器", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                    timer1.Enabled = true;
+                    return;
+                }
+                else
+                {
+                    if (MessageBox.Show("确认写入", "确认写入?", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                     {
-                        if (textBox_Sensor1_K.Text != string.Empty)
+                        if (checkBox_Sensor1.Checked == true)
                         {
-                            K[0] = 1;
-                            DataTemp = (ushort)(decimal.Parse(textBox_Sensor1_K.Text) * 100);
-                            K[1] = Convert.ToByte(DataTemp);
-                            SendCmd((ushort)0x751, (byte)0x16, (ushort)0x3402, K);
-                            Thread.Sleep(20);
+                            if (textBox_Sensor1_K.Text != string.Empty)
+                            {
+                                K[0] = 1;
+                                DataTemp = (ushort)(decimal.Parse(textBox_Sensor1_K.Text) * 100);
+                                K[1] = Convert.ToByte(DataTemp);
+                                SendCmd((ushort)0x751, (byte)0x16, (ushort)0x3402, K);
+                                Thread.Sleep(20);
+                            }
                         }
-                    }
-                    if (checkBox_Sensor2.Checked == true)
-                    {
-                        if (textBox_Sensor2_K.Text != string.Empty)
+                        if (checkBox_Sensor2.Checked == true)
                         {
-                            K[0] = 2;
-                            DataTemp = (ushort)(decimal.Parse(textBox_Sensor2_K.Text) * 100);
-                            K[1] = Convert.ToByte(DataTemp);
-                            SendCmd((ushort)0x751, (byte)0x16, (ushort)0x3402, K);
-                            Thread.Sleep(20);
+                            if (textBox_Sensor2_K.Text != string.Empty)
+                            {
+                                K[0] = 2;
+                                DataTemp = (ushort)(decimal.Parse(textBox_Sensor2_K.Text) * 100);
+                                K[1] = Convert.ToByte(DataTemp);
+                                SendCmd((ushort)0x751, (byte)0x16, (ushort)0x3402, K);
+                                Thread.Sleep(20);
+                            }
                         }
-                    }
-                    if (checkBox_Sensor3.Checked == true)
-                    {
-                        if (textBox_Sensor3_K.Text != string.Empty)
+                        if (checkBox_Sensor3.Checked == true)
                         {
-                            K[0] = 3;
-                            DataTemp = (ushort)(decimal.Parse(textBox_Sensor3_K.Text) * 100);
-                            K[1] = Convert.ToByte(DataTemp);
-                            SendCmd((ushort)0x751, (byte)0x16, (ushort)0x3402, K);
-                            Thread.Sleep(20);
+                            if (textBox_Sensor3_K.Text != string.Empty)
+                            {
+                                K[0] = 3;
+                                DataTemp = (ushort)(decimal.Parse(textBox_Sensor3_K.Text) * 100);
+                                K[1] = Convert.ToByte(DataTemp);
+                                SendCmd((ushort)0x751, (byte)0x16, (ushort)0x3402, K);
+                                Thread.Sleep(20);
+                            }
                         }
                     }
                 }
             }
+
         }
 
         //查询传感器零点
         private void button_ReadZero_Click(object sender, EventArgs e)
         {
-            var K = new byte[1];
-
-            textBox_Sensor1_Zero.Text = "---";
-            textBox_Sensor2_Zero.Text = "---";
-            textBox_Sensor3_Zero.Text = "---";
-            textBox_Sensor1_K.Text = "---";
-            textBox_Sensor2_K.Text = "---";
-            textBox_Sensor3_K.Text = "---";
-            //轮询零点
-            for (ushort i = 1; i <= 3; i++)
+            if (radioButton_SingleSensor.Checked)
             {
-                K[0] = (byte)i;
-                SendCmd((ushort)0x751, (byte)0x16, (ushort)0x3201, K);
+                textBox_Sensor1_Zero.Text = "---";
+                textBox_Sensor1_K.Text = "---";
+                SendCmd((ushort)0x751, (byte)0x11, (ushort)0x2000, null);
+                SendCmd((ushort)0x751, (byte)0x11, (ushort)0x2900, null);
             }
-
-            //轮询校正系数
-            for (ushort i = 1; i <= 3; i++)
+            else if (radioButton_ThreeSensor.Checked)
             {
-                K[0] = (byte)i;
-                SendCmd((ushort)0x751, (byte)0x16, (ushort)0x3301, K);
+                var K = new byte[1];
+
+                textBox_Sensor1_Zero.Text = "---";
+                textBox_Sensor2_Zero.Text = "---";
+                textBox_Sensor3_Zero.Text = "---";
+                textBox_Sensor1_K.Text = "---";
+                textBox_Sensor2_K.Text = "---";
+                textBox_Sensor3_K.Text = "---";
+                //轮询零点
+                for (ushort i = 1; i <= 3; i++)
+                {
+                    K[0] = (byte)i;
+                    SendCmd((ushort)0x751, (byte)0x16, (ushort)0x3201, K);
+                }
+
+                //轮询校正系数
+                for (ushort i = 1; i <= 3; i++)
+                {
+                    K[0] = (byte)i;
+                    SendCmd((ushort)0x751, (byte)0x16, (ushort)0x3301, K);
+                }
             }
+                        
         }
 
         //计算校正系数
@@ -563,16 +588,16 @@ namespace MOTINOVA_MC_Test
             float K;
             string DataTemp;
 
-            if ((checkBox_Sensor1.Checked == false) && (checkBox_Sensor2.Checked == false) && (checkBox_Sensor3.Checked == false))
-            {
-                timer1.Enabled = false;
-                MessageBox.Show("请选择传感器", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
-                timer1.Enabled = true;
-                return;
-            }
-            else
+            if (radioButton_SingleSensor.Checked)
             {
-                if (checkBox_Sensor1.Checked == true)
+                if (checkBox_Sensor1.Checked == false)
+                {
+                    timer1.Enabled = false;
+                    MessageBox.Show("请选择传感器", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                    timer1.Enabled = true;
+                    return;
+                }
+                else
                 {
                     if ((textBox_Sensor1_Avg.Text != "---") && (textBox_Sensor1_Avg.Text != string.Empty))
                     {
@@ -586,35 +611,63 @@ namespace MOTINOVA_MC_Test
                         textBox_Sensor1_K.Text = "";
                     }
                 }
-                if (checkBox_Sensor2.Checked == true)
+            }
+            else if (radioButton_ThreeSensor.Checked)
+            {
+                if ((checkBox_Sensor1.Checked == false) && (checkBox_Sensor2.Checked == false) && (checkBox_Sensor3.Checked == false))
                 {
-                    if ((textBox_Sensor2_Avg.Text != "---") && (textBox_Sensor2_Avg.Text != string.Empty))
-                    {
-                        DataTemp = textBox_Sensor2_Avg.Text;
-                        DataTemp = System.Text.RegularExpressions.Regex.Replace(DataTemp, @"[^0-9]+", "");
-                        K = float.Parse(DataTemp) / 75f;
-                        textBox_Sensor2_K.Text = K.ToString("#0.00");
-                    }
-                    else
-                    {
-                        textBox_Sensor2_K.Text = "";
-                    }
+                    timer1.Enabled = false;
+                    MessageBox.Show("请选择传感器", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                    timer1.Enabled = true;
+                    return;
                 }
-                if (checkBox_Sensor3.Checked == true)
+                else
                 {
-                    if ((textBox_Sensor3_Avg.Text != "---") && (textBox_Sensor3_Avg.Text != string.Empty))
+                    if (checkBox_Sensor1.Checked == true)
                     {
-                        DataTemp = textBox_Sensor3_Avg.Text;
-                        DataTemp = System.Text.RegularExpressions.Regex.Replace(DataTemp, @"[^0-9]+", "");
-                        K = float.Parse(DataTemp) / 75f;
-                        textBox_Sensor3_K.Text = K.ToString("#0.00");
+                        if ((textBox_Sensor1_Avg.Text != "---") && (textBox_Sensor1_Avg.Text != string.Empty))
+                        {
+                            DataTemp = textBox_Sensor1_Avg.Text;
+                            DataTemp = System.Text.RegularExpressions.Regex.Replace(DataTemp, @"[^0-9]+", "");
+                            K = float.Parse(DataTemp) / 75f;
+                            textBox_Sensor1_K.Text = K.ToString("#0.00");
+                        }
+                        else
+                        {
+                            textBox_Sensor1_K.Text = "";
+                        }
                     }
-                    else
+                    if (checkBox_Sensor2.Checked == true)
+                    {
+                        if ((textBox_Sensor2_Avg.Text != "---") && (textBox_Sensor2_Avg.Text != string.Empty))
+                        {
+                            DataTemp = textBox_Sensor2_Avg.Text;
+                            DataTemp = System.Text.RegularExpressions.Regex.Replace(DataTemp, @"[^0-9]+", "");
+                            K = float.Parse(DataTemp) / 75f;
+                            textBox_Sensor2_K.Text = K.ToString("#0.00");
+                        }
+                        else
+                        {
+                            textBox_Sensor2_K.Text = "";
+                        }
+                    }
+                    if (checkBox_Sensor3.Checked == true)
                     {
-                        textBox_Sensor3_K.Text = "";
+                        if ((textBox_Sensor3_Avg.Text != "---") && (textBox_Sensor3_Avg.Text != string.Empty))
+                        {
+                            DataTemp = textBox_Sensor3_Avg.Text;
+                            DataTemp = System.Text.RegularExpressions.Regex.Replace(DataTemp, @"[^0-9]+", "");
+                            K = float.Parse(DataTemp) / 75f;
+                            textBox_Sensor3_K.Text = K.ToString("#0.00");
+                        }
+                        else
+                        {
+                            textBox_Sensor3_K.Text = "";
+                        }
                     }
                 }
             }
+            
         }
 
         //发送力矩传感器启动值
@@ -1917,6 +1970,9 @@ namespace MOTINOVA_MC_Test
                                     //PCB最低温
                                     DataTemp_Int16 = (short)(ushort)binary_data_1[37];
                                     textBox_Runlog1_PCB_MIN.Text = Convert.ToString(DataTemp_Int16 - 40);
+                                    //ODO里程
+                                    DataTemp_Uint32 = (UInt32)((binary_data_1[41] << 24) + (binary_data_1[40] << 16) + (binary_data_1[39] << 8) + binary_data_1[38]);
+                                    textBox_ODO_Km.Text = ((float)DataTemp_Uint32 / 10f).ToString("0.0");                                    
                                     //绕组最高温
                                     DataTemp_Int16 = (short)(ushort)binary_data_1[42];
                                     textBox_Runlog1_Coil_MAX.Text = Convert.ToString(DataTemp_Int16 - 40);
@@ -1929,6 +1985,9 @@ namespace MOTINOVA_MC_Test
                                     //MCU最低温
                                     DataTemp_Int16 = (short)(ushort)binary_data_1[45];
                                     textBox_Runlog1_MCU_MIN.Text = Convert.ToString(DataTemp_Int16 - 40);
+                                    //ODO时间
+                                    DataTemp_Uint32 = (UInt32)((binary_data_1[49] << 24) + (binary_data_1[48] << 16) + (binary_data_1[47] << 8) + binary_data_1[46]);                                    
+                                    textBox_ODO_Time.Text = Convert.ToString(DataTemp_Uint32);
                                 }));
                             }
                             break;
@@ -3974,5 +4033,51 @@ namespace MOTINOVA_MC_Test
                 }
             }
         }
+
+        //选择单力矩
+        private void radioButton_SingleSensor_CheckedChanged(object sender, EventArgs e)
+        {
+            checkBox_Sensor2.Checked = true;
+
+            label5.Visible = false;
+            textBox_Sensor2_Avg.Visible = false;
+            textBox_Sensor2_Std.Visible = false;
+            textBox_Sensor2_Zero.Visible = false;
+            textBox_Sensor2_K.Visible = false;
+            checkBox_Sensor2.Visible = false;
+            checkBox_Sensor2.Checked = false;
+
+            label115.Visible = false;
+            textBox_Sensor3_Avg.Visible = false;
+            textBox_Sensor3_Std.Visible = false;
+            textBox_Sensor3_Zero.Visible = false;
+            textBox_Sensor3_K.Visible = false;
+            checkBox_Sensor3.Visible = false;
+            checkBox_Sensor3.Checked = false;
+
+            //this.BackColor = Color.White;
+        }
+
+        //选择三力矩
+        private void radioButton_ThreeSensor_CheckedChanged(object sender, EventArgs e)
+        {
+            checkBox_Sensor1.Checked = true;
+
+            label5.Visible = true;
+            textBox_Sensor2_Avg.Visible = true;
+            textBox_Sensor2_Std.Visible = true;
+            textBox_Sensor2_Zero.Visible = true;
+            textBox_Sensor2_K.Visible = true;
+            checkBox_Sensor2.Visible = true;
+            checkBox_Sensor2.Checked = true;
+
+            label115.Visible = true;
+            textBox_Sensor3_Avg.Visible = true;
+            textBox_Sensor3_Std.Visible = true;
+            textBox_Sensor3_Zero.Visible = true;
+            textBox_Sensor3_K.Visible = true;
+            checkBox_Sensor3.Visible = true;
+            checkBox_Sensor3.Checked = true;
+        }
     }
 }

+ 1 - 1
MOTINOVA_MC_Test/bin/Debug/MOTINOVA_MC_Test.application

@@ -11,7 +11,7 @@
           <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
         </dsig:Transforms>
         <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
-        <dsig:DigestValue>Ef4QoqV6VdHxyArYJQp8k6Z2zo8=</dsig:DigestValue>
+        <dsig:DigestValue>16QMdvkDuyYNqD+6uxFUQ68evB0=</dsig:DigestValue>
       </hash>
     </dependentAssembly>
   </dependency>

二進制
MOTINOVA_MC_Test/bin/Debug/MOTINOVA_MC_Test.exe


+ 2 - 2
MOTINOVA_MC_Test/bin/Debug/MOTINOVA_MC_Test.exe.manifest

@@ -48,14 +48,14 @@
     </dependentAssembly>
   </dependency>
   <dependency>
-    <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="MOTINOVA_MC_Test.exe" size="252928">
+    <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="MOTINOVA_MC_Test.exe" size="255488">
       <assemblyIdentity name="MOTINOVA_MC_Test" version="1.0.0.0" language="neutral" processorArchitecture="msil" />
       <hash>
         <dsig:Transforms>
           <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
         </dsig:Transforms>
         <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
-        <dsig:DigestValue>sZZoVDiMqXfgM3wsRzcOc9GeJGY=</dsig:DigestValue>
+        <dsig:DigestValue>iwNhog0BUQVoWK4X/nk3VnwOs5k=</dsig:DigestValue>
       </hash>
     </dependentAssembly>
   </dependency>

二進制
MOTINOVA_MC_Test/bin/Debug/MOTINOVA_MC_Test.pdb


二進制
MOTINOVA_MC_Test/bin/Debug/app.publish/MOTINOVA_MC_Test.exe


二進制
MOTINOVA_MC_Test/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache


+ 1 - 1
MOTINOVA_MC_Test/obj/Debug/MOTINOVA_MC_Test.application

@@ -11,7 +11,7 @@
           <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
         </dsig:Transforms>
         <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
-        <dsig:DigestValue>Ef4QoqV6VdHxyArYJQp8k6Z2zo8=</dsig:DigestValue>
+        <dsig:DigestValue>16QMdvkDuyYNqD+6uxFUQ68evB0=</dsig:DigestValue>
       </hash>
     </dependentAssembly>
   </dependency>

二進制
MOTINOVA_MC_Test/obj/Debug/MOTINOVA_MC_Test.csproj.AssemblyReference.cache


二進制
MOTINOVA_MC_Test/obj/Debug/MOTINOVA_MC_Test.csproj.GenerateResource.cache


二進制
MOTINOVA_MC_Test/obj/Debug/MOTINOVA_MC_Test.exe


+ 2 - 2
MOTINOVA_MC_Test/obj/Debug/MOTINOVA_MC_Test.exe.manifest

@@ -48,14 +48,14 @@
     </dependentAssembly>
   </dependency>
   <dependency>
-    <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="MOTINOVA_MC_Test.exe" size="252928">
+    <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="MOTINOVA_MC_Test.exe" size="255488">
       <assemblyIdentity name="MOTINOVA_MC_Test" version="1.0.0.0" language="neutral" processorArchitecture="msil" />
       <hash>
         <dsig:Transforms>
           <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
         </dsig:Transforms>
         <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
-        <dsig:DigestValue>sZZoVDiMqXfgM3wsRzcOc9GeJGY=</dsig:DigestValue>
+        <dsig:DigestValue>iwNhog0BUQVoWK4X/nk3VnwOs5k=</dsig:DigestValue>
       </hash>
     </dependentAssembly>
   </dependency>

二進制
MOTINOVA_MC_Test/obj/Debug/MOTINOVA_MC_Test.pdb