소스 검색

V1.2.1
1、增加力矩Reg显示,将原运行信息中ODO改为力矩Reg;
2、马达参数、整车参数、助力参数改为有符号类型。

Dail 2 년 전
부모
커밋
27f0e23fec

BIN
.vs/Welling_Motor_Debug_Tool/v17/.suo


+ 52 - 51
Welling_Motor_Debug_Tool/Form1.Designer.cs

@@ -65,6 +65,8 @@ namespace Welling_Motor_Debug_Tool
             this.label2 = new System.Windows.Forms.Label();
             this.label1 = new System.Windows.Forms.Label();
             this.groupBox2 = new System.Windows.Forms.GroupBox();
+            this.textBox_TorqueReg = new System.Windows.Forms.TextBox();
+            this.label55 = new System.Windows.Forms.Label();
             this.textBox_ErrorCode = new System.Windows.Forms.TextBox();
             this.textBox_RunInfo_Trip_Time = new System.Windows.Forms.TextBox();
             this.textBox_RunInfo_Range = new System.Windows.Forms.TextBox();
@@ -361,8 +363,6 @@ namespace Welling_Motor_Debug_Tool
             this.label45 = new System.Windows.Forms.Label();
             this.label46 = new System.Windows.Forms.Label();
             this.pictureBox2 = new System.Windows.Forms.PictureBox();
-            this.textBox_TorqueReg = new System.Windows.Forms.TextBox();
-            this.label55 = new System.Windows.Forms.Label();
             this.menuStrip_Set.SuspendLayout();
             this.statusStrip1.SuspendLayout();
             this.groupBox1.SuspendLayout();
@@ -502,7 +502,7 @@ namespace Welling_Motor_Debug_Tool
             this.写入存储ToolStripMenuItem.Checked = true;
             this.写入存储ToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked;
             this.写入存储ToolStripMenuItem.Name = "写入存储ToolStripMenuItem";
-            this.写入存储ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
+            this.写入存储ToolStripMenuItem.Size = new System.Drawing.Size(144, 26);
             this.写入存储ToolStripMenuItem.Text = "执行保存";
             this.写入存储ToolStripMenuItem.Click += new System.EventHandler(this.写入存储ToolStripMenuItem_Click);
             // 
@@ -512,13 +512,13 @@ namespace Welling_Motor_Debug_Tool
             this.空载ToolStripMenuItem,
             this.带载ToolStripMenuItem});
             this.带载类型ToolStripMenuItem.Name = "带载类型ToolStripMenuItem";
-            this.带载类型ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
+            this.带载类型ToolStripMenuItem.Size = new System.Drawing.Size(144, 26);
             this.带载类型ToolStripMenuItem.Text = "带载类型";
             // 
             // 空载ToolStripMenuItem
             // 
             this.空载ToolStripMenuItem.Name = "空载ToolStripMenuItem";
-            this.空载ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
+            this.空载ToolStripMenuItem.Size = new System.Drawing.Size(112, 26);
             this.空载ToolStripMenuItem.Text = "空载";
             this.空载ToolStripMenuItem.Click += new System.EventHandler(this.空载ToolStripMenuItem_Click);
             // 
@@ -527,7 +527,7 @@ namespace Welling_Motor_Debug_Tool
             this.带载ToolStripMenuItem.Checked = true;
             this.带载ToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked;
             this.带载ToolStripMenuItem.Name = "带载ToolStripMenuItem";
-            this.带载ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
+            this.带载ToolStripMenuItem.Size = new System.Drawing.Size(112, 26);
             this.带载ToolStripMenuItem.Text = "带载";
             this.带载ToolStripMenuItem.Click += new System.EventHandler(this.带载ToolStripMenuItem_Click);
             // 
@@ -783,6 +783,24 @@ namespace Welling_Motor_Debug_Tool
             this.groupBox2.TabStop = false;
             this.groupBox2.Text = "运行信息";
             // 
+            // textBox_TorqueReg
+            // 
+            this.textBox_TorqueReg.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
+            this.textBox_TorqueReg.Location = new System.Drawing.Point(721, 107);
+            this.textBox_TorqueReg.Name = "textBox_TorqueReg";
+            this.textBox_TorqueReg.ReadOnly = true;
+            this.textBox_TorqueReg.Size = new System.Drawing.Size(90, 28);
+            this.textBox_TorqueReg.TabIndex = 3;
+            // 
+            // label55
+            // 
+            this.label55.AutoSize = true;
+            this.label55.Location = new System.Drawing.Point(641, 111);
+            this.label55.Name = "label55";
+            this.label55.Size = new System.Drawing.Size(71, 21);
+            this.label55.TabIndex = 2;
+            this.label55.Text = "力矩Reg";
+            // 
             // textBox_ErrorCode
             // 
             this.textBox_ErrorCode.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
@@ -2319,19 +2337,19 @@ namespace Welling_Motor_Debug_Tool
             this.groupBox26.Controls.Add(this.button_OBC_ButtonDec);
             this.groupBox26.Controls.Add(this.button_OBC_ButtonAcc);
             this.groupBox26.Controls.Add(this.button_OBC_ButtonPower);
-            this.groupBox26.Location = new System.Drawing.Point(212, 4);
+            this.groupBox26.Location = new System.Drawing.Point(233, 4);
             this.groupBox26.Name = "groupBox26";
-            this.groupBox26.Size = new System.Drawing.Size(97, 305);
+            this.groupBox26.Size = new System.Drawing.Size(76, 305);
             this.groupBox26.TabIndex = 14;
             this.groupBox26.TabStop = false;
-            this.groupBox26.Text = "按键状态";
+            this.groupBox26.Text = "按键";
             // 
             // button_OBC_ButtonSet
             // 
             this.button_OBC_ButtonSet.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
-            this.button_OBC_ButtonSet.Location = new System.Drawing.Point(14, 225);
+            this.button_OBC_ButtonSet.Location = new System.Drawing.Point(6, 227);
             this.button_OBC_ButtonSet.Name = "button_OBC_ButtonSet";
-            this.button_OBC_ButtonSet.Size = new System.Drawing.Size(70, 35);
+            this.button_OBC_ButtonSet.Size = new System.Drawing.Size(60, 35);
             this.button_OBC_ButtonSet.TabIndex = 20;
             this.button_OBC_ButtonSet.Text = "Set";
             this.button_OBC_ButtonSet.UseVisualStyleBackColor = false;
@@ -2340,9 +2358,9 @@ namespace Welling_Motor_Debug_Tool
             // button_OBC_ButtonLight
             // 
             this.button_OBC_ButtonLight.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
-            this.button_OBC_ButtonLight.Location = new System.Drawing.Point(14, 185);
+            this.button_OBC_ButtonLight.Location = new System.Drawing.Point(6, 187);
             this.button_OBC_ButtonLight.Name = "button_OBC_ButtonLight";
-            this.button_OBC_ButtonLight.Size = new System.Drawing.Size(70, 35);
+            this.button_OBC_ButtonLight.Size = new System.Drawing.Size(60, 35);
             this.button_OBC_ButtonLight.TabIndex = 19;
             this.button_OBC_ButtonLight.Text = "Light";
             this.button_OBC_ButtonLight.UseVisualStyleBackColor = false;
@@ -2351,9 +2369,9 @@ namespace Welling_Motor_Debug_Tool
             // button_OBC_ButtonWalk
             // 
             this.button_OBC_ButtonWalk.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
-            this.button_OBC_ButtonWalk.Location = new System.Drawing.Point(14, 145);
+            this.button_OBC_ButtonWalk.Location = new System.Drawing.Point(6, 147);
             this.button_OBC_ButtonWalk.Name = "button_OBC_ButtonWalk";
-            this.button_OBC_ButtonWalk.Size = new System.Drawing.Size(70, 35);
+            this.button_OBC_ButtonWalk.Size = new System.Drawing.Size(60, 35);
             this.button_OBC_ButtonWalk.TabIndex = 18;
             this.button_OBC_ButtonWalk.Text = "Walk";
             this.button_OBC_ButtonWalk.UseVisualStyleBackColor = false;
@@ -2362,9 +2380,9 @@ namespace Welling_Motor_Debug_Tool
             // button_OBC_ButtonDec
             // 
             this.button_OBC_ButtonDec.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
-            this.button_OBC_ButtonDec.Location = new System.Drawing.Point(14, 105);
+            this.button_OBC_ButtonDec.Location = new System.Drawing.Point(6, 107);
             this.button_OBC_ButtonDec.Name = "button_OBC_ButtonDec";
-            this.button_OBC_ButtonDec.Size = new System.Drawing.Size(70, 35);
+            this.button_OBC_ButtonDec.Size = new System.Drawing.Size(60, 35);
             this.button_OBC_ButtonDec.TabIndex = 17;
             this.button_OBC_ButtonDec.Text = "-";
             this.button_OBC_ButtonDec.UseVisualStyleBackColor = false;
@@ -2373,9 +2391,9 @@ namespace Welling_Motor_Debug_Tool
             // button_OBC_ButtonAcc
             // 
             this.button_OBC_ButtonAcc.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
-            this.button_OBC_ButtonAcc.Location = new System.Drawing.Point(14, 65);
+            this.button_OBC_ButtonAcc.Location = new System.Drawing.Point(6, 67);
             this.button_OBC_ButtonAcc.Name = "button_OBC_ButtonAcc";
-            this.button_OBC_ButtonAcc.Size = new System.Drawing.Size(70, 35);
+            this.button_OBC_ButtonAcc.Size = new System.Drawing.Size(60, 35);
             this.button_OBC_ButtonAcc.TabIndex = 16;
             this.button_OBC_ButtonAcc.Text = "+";
             this.button_OBC_ButtonAcc.UseVisualStyleBackColor = false;
@@ -2384,9 +2402,9 @@ namespace Welling_Motor_Debug_Tool
             // button_OBC_ButtonPower
             // 
             this.button_OBC_ButtonPower.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
-            this.button_OBC_ButtonPower.Location = new System.Drawing.Point(14, 25);
+            this.button_OBC_ButtonPower.Location = new System.Drawing.Point(6, 27);
             this.button_OBC_ButtonPower.Name = "button_OBC_ButtonPower";
-            this.button_OBC_ButtonPower.Size = new System.Drawing.Size(70, 35);
+            this.button_OBC_ButtonPower.Size = new System.Drawing.Size(60, 35);
             this.button_OBC_ButtonPower.TabIndex = 15;
             this.button_OBC_ButtonPower.Text = "Power";
             this.button_OBC_ButtonPower.UseVisualStyleBackColor = false;
@@ -2791,9 +2809,9 @@ namespace Welling_Motor_Debug_Tool
             // 
             this.groupBox11.Controls.Add(this.richTextBox_OBC_BMS_RunInfo);
             this.groupBox11.Controls.Add(this.checkBox_OBC_StartReadBMS);
-            this.groupBox11.Location = new System.Drawing.Point(4, 108);
+            this.groupBox11.Location = new System.Drawing.Point(4, 72);
             this.groupBox11.Name = "groupBox11";
-            this.groupBox11.Size = new System.Drawing.Size(202, 201);
+            this.groupBox11.Size = new System.Drawing.Size(223, 237);
             this.groupBox11.TabIndex = 11;
             this.groupBox11.TabStop = false;
             this.groupBox11.Text = "读取电池运行信息";
@@ -2801,17 +2819,18 @@ namespace Welling_Motor_Debug_Tool
             // richTextBox_OBC_BMS_RunInfo
             // 
             this.richTextBox_OBC_BMS_RunInfo.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
+            this.richTextBox_OBC_BMS_RunInfo.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.richTextBox_OBC_BMS_RunInfo.Location = new System.Drawing.Point(6, 27);
             this.richTextBox_OBC_BMS_RunInfo.Name = "richTextBox_OBC_BMS_RunInfo";
             this.richTextBox_OBC_BMS_RunInfo.ReadOnly = true;
-            this.richTextBox_OBC_BMS_RunInfo.Size = new System.Drawing.Size(185, 127);
+            this.richTextBox_OBC_BMS_RunInfo.Size = new System.Drawing.Size(211, 203);
             this.richTextBox_OBC_BMS_RunInfo.TabIndex = 12;
             this.richTextBox_OBC_BMS_RunInfo.Text = "";
             // 
             // checkBox_OBC_StartReadBMS
             // 
             this.checkBox_OBC_StartReadBMS.AutoSize = true;
-            this.checkBox_OBC_StartReadBMS.Location = new System.Drawing.Point(130, 169);
+            this.checkBox_OBC_StartReadBMS.Location = new System.Drawing.Point(156, 0);
             this.checkBox_OBC_StartReadBMS.Name = "checkBox_OBC_StartReadBMS";
             this.checkBox_OBC_StartReadBMS.Size = new System.Drawing.Size(61, 25);
             this.checkBox_OBC_StartReadBMS.TabIndex = 5;
@@ -2828,7 +2847,7 @@ namespace Welling_Motor_Debug_Tool
             this.groupBox10.Controls.Add(this.checkBox_OBC_StartSetGearSt);
             this.groupBox10.Location = new System.Drawing.Point(4, 4);
             this.groupBox10.Name = "groupBox10";
-            this.groupBox10.Size = new System.Drawing.Size(202, 98);
+            this.groupBox10.Size = new System.Drawing.Size(223, 62);
             this.groupBox10.TabIndex = 10;
             this.groupBox10.TabStop = false;
             this.groupBox10.Text = "控制电机档位";
@@ -2836,11 +2855,11 @@ namespace Welling_Motor_Debug_Tool
             // label60
             // 
             this.label60.AutoSize = true;
-            this.label60.Location = new System.Drawing.Point(6, 62);
+            this.label60.Location = new System.Drawing.Point(122, 32);
             this.label60.Name = "label60";
-            this.label60.Size = new System.Drawing.Size(42, 21);
+            this.label60.Size = new System.Drawing.Size(26, 21);
             this.label60.TabIndex = 8;
-            this.label60.Text = "灯";
+            this.label60.Text = "灯";
             // 
             // comboBox_OBC_LightSw
             // 
@@ -2851,9 +2870,9 @@ namespace Welling_Motor_Debug_Tool
             this.comboBox_OBC_LightSw.Items.AddRange(new object[] {
             "ON",
             "OFF"});
-            this.comboBox_OBC_LightSw.Location = new System.Drawing.Point(51, 58);
+            this.comboBox_OBC_LightSw.Location = new System.Drawing.Point(147, 28);
             this.comboBox_OBC_LightSw.Name = "comboBox_OBC_LightSw";
-            this.comboBox_OBC_LightSw.Size = new System.Drawing.Size(73, 29);
+            this.comboBox_OBC_LightSw.Size = new System.Drawing.Size(65, 29);
             this.comboBox_OBC_LightSw.TabIndex = 6;
             // 
             // label61
@@ -2881,13 +2900,13 @@ namespace Welling_Motor_Debug_Tool
             "WALK"});
             this.comboBox_OBC_SetGearST.Location = new System.Drawing.Point(51, 28);
             this.comboBox_OBC_SetGearST.Name = "comboBox_OBC_SetGearST";
-            this.comboBox_OBC_SetGearST.Size = new System.Drawing.Size(73, 29);
+            this.comboBox_OBC_SetGearST.Size = new System.Drawing.Size(65, 29);
             this.comboBox_OBC_SetGearST.TabIndex = 4;
             // 
             // checkBox_OBC_StartSetGearSt
             // 
             this.checkBox_OBC_StartSetGearSt.AutoSize = true;
-            this.checkBox_OBC_StartSetGearSt.Location = new System.Drawing.Point(130, 60);
+            this.checkBox_OBC_StartSetGearSt.Location = new System.Drawing.Point(156, -1);
             this.checkBox_OBC_StartSetGearSt.Name = "checkBox_OBC_StartSetGearSt";
             this.checkBox_OBC_StartSetGearSt.Size = new System.Drawing.Size(61, 25);
             this.checkBox_OBC_StartSetGearSt.TabIndex = 5;
@@ -3975,24 +3994,6 @@ namespace Welling_Motor_Debug_Tool
             this.pictureBox2.TabIndex = 16;
             this.pictureBox2.TabStop = false;
             // 
-            // textBox_TorqueReg
-            // 
-            this.textBox_TorqueReg.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
-            this.textBox_TorqueReg.Location = new System.Drawing.Point(721, 107);
-            this.textBox_TorqueReg.Name = "textBox_TorqueReg";
-            this.textBox_TorqueReg.ReadOnly = true;
-            this.textBox_TorqueReg.Size = new System.Drawing.Size(90, 28);
-            this.textBox_TorqueReg.TabIndex = 3;
-            // 
-            // label55
-            // 
-            this.label55.AutoSize = true;
-            this.label55.Location = new System.Drawing.Point(641, 111);
-            this.label55.Name = "label55";
-            this.label55.Size = new System.Drawing.Size(71, 21);
-            this.label55.TabIndex = 2;
-            this.label55.Text = "力矩Reg";
-            // 
             // Form1
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 21F);

+ 27 - 31
Welling_Motor_Debug_Tool/Form1.cs

@@ -367,7 +367,7 @@ namespace Welling_Motor_Debug_Tool
                                     richTextBox_MotorParam.Clear();
                                     for (int i = 0; i < myParams.MotorParma.Count; i++)
                                     {
-                                        richTextBox_MotorParam.AppendText(myParams.MotorParma[i] + "=" + Convert.ToString(Data[2 * i + 1] * 256 + Data[2 * i]) + ", ");
+                                        richTextBox_MotorParam.AppendText(myParams.MotorParma[i] + "=" + Convert.ToString((short)(Data[2 * i + 1] * 256 + Data[2 * i])) + ", ");
                                     }
                                     richTextBox_MotorParam.Text = richTextBox_MotorParam.Text.Substring(0, richTextBox_MotorParam.Text.Length - 2);
                                 }));
@@ -383,7 +383,7 @@ namespace Welling_Motor_Debug_Tool
                                     richTextBox_BikeParam.Clear();
                                     for (int i = 0; i < myParams.BikeParma.Count; i++)
                                     {
-                                        richTextBox_BikeParam.AppendText(myParams.BikeParma[i] + "=" + Convert.ToString(Data[2 * i + 1] * 256 + Data[2 * i]) + ", ");
+                                        richTextBox_BikeParam.AppendText(myParams.BikeParma[i] + "=" + Convert.ToString((short)(Data[2 * i + 1] * 256 + Data[2 * i])) + ", ");
                                     }
                                     richTextBox_BikeParam.Text = richTextBox_BikeParam.Text.Substring(0, richTextBox_BikeParam.Text.Length - 2);
                                     //更新生产模式中整车参数
@@ -420,7 +420,7 @@ namespace Welling_Motor_Debug_Tool
                                     richTextBox_ControlParam.Clear();
                                     for (int i = 0; i < myParams.ControlParma.Count; i++)
                                     {
-                                        richTextBox_ControlParam.AppendText(myParams.ControlParma[i] + "=" + Convert.ToString(Data[2 * i + 1] * 256 + Data[2 * i]) + ", ");
+                                        richTextBox_ControlParam.AppendText(myParams.ControlParma[i] + "=" + Convert.ToString((ushort)(Data[2 * i + 1] * 256 + Data[2 * i])) + ", ");
                                     }
                                     richTextBox_ControlParam.Text = richTextBox_ControlParam.Text.Substring(0, richTextBox_ControlParam.Text.Length - 2);
                                 }));
@@ -436,7 +436,7 @@ namespace Welling_Motor_Debug_Tool
                                     richTextBox_SensorParam.Clear();
                                     for (int i = 0; i < myParams.SensorParam.Count; i++)
                                     {
-                                        richTextBox_SensorParam.AppendText(myParams.SensorParam[i] + "=" + Convert.ToString(Data[2 * i + 1] * 256 + Data[2 * i]) + ", ");
+                                        richTextBox_SensorParam.AppendText(myParams.SensorParam[i] + "=" + Convert.ToString((ushort)(Data[2 * i + 1] * 256 + Data[2 * i])) + ", ");
                                     }
                                     richTextBox_SensorParam.Text = richTextBox_SensorParam.Text.Substring(0, richTextBox_SensorParam.Text.Length - 2);
                                     //更新生产模式页面传感器零点和标定值
@@ -462,15 +462,15 @@ namespace Welling_Motor_Debug_Tool
                                     {
                                         if (i < index_1) //数据占用2bytes
                                         {
-                                            richTextBox_AssistParam.AppendText(myParams.AssistParam[i] + "=" + Convert.ToString(Data[2 * i + 1] * 256 + Data[2 * i]) + ", ");
+                                            richTextBox_AssistParam.AppendText(myParams.AssistParam[i] + "=" + Convert.ToString((ushort)(Data[2 * i + 1] * 256 + Data[2 * i])) + ", ");
                                         }
                                         else if (i <= index_2) //数据占用4bytes
                                         {
-                                            richTextBox_AssistParam.AppendText(myParams.AssistParam[i] + "=" + Convert.ToString((Data[4 * i - 5] << 24) + (Data[4 * i - 6] << 16) + (Data[4 * i - 7] << 8) + Data[4 * i - 8]) + ", ");
+                                            richTextBox_AssistParam.AppendText(myParams.AssistParam[i] + "=" + Convert.ToString((long)((Data[4 * i - 5] << 24) + (Data[4 * i - 6] << 16) + (Data[4 * i - 7] << 8) + Data[4 * i - 8])) + ", ");
                                         }
                                         else //数据占用2bytes
                                         {
-                                            richTextBox_AssistParam.AppendText(myParams.AssistParam[i] + "=" + Convert.ToString(Data[2 * i + 17] * 256 + Data[2 * i + 16]) + ", ");
+                                            richTextBox_AssistParam.AppendText(myParams.AssistParam[i] + "=" + Convert.ToString((ushort)(Data[2 * i + 17] * 256 + Data[2 * i + 16])) + ", ");
                                         }
 
                                     }
@@ -511,7 +511,7 @@ namespace Welling_Motor_Debug_Tool
                                     richTextBox_DebugParam.Clear();
                                     for (int i = 0; i < myParams.DebugParam.Count; i++)
                                     {
-                                        richTextBox_DebugParam.AppendText(myParams.DebugParam[i] + "=" + Convert.ToString(Data[2 * i + 1] * 256 + Data[2 * i]) + ", ");
+                                        richTextBox_DebugParam.AppendText(myParams.DebugParam[i] + "=" + Convert.ToString((short)(Data[2 * i + 1] * 256 + Data[2 * i])) + ", ");
                                     }
                                     richTextBox_DebugParam.Text = richTextBox_DebugParam.Text.Substring(0, richTextBox_DebugParam.Text.Length - 2);
                                 }));
@@ -874,7 +874,7 @@ namespace Welling_Motor_Debug_Tool
                                     //电池状态
                                     richTextBox_OBC_BMS_RunInfo.AppendText("电池状态:" + Convert.ToString(Data[10], 16).PadLeft(2, '0').ToUpper() + " H" + "\r\n");
                                     //SOH
-                                    richTextBox_OBC_BMS_RunInfo.AppendText("电池寿命:" + Convert.ToString(Data[11]) + " %" + "\r\n");
+                                    richTextBox_OBC_BMS_RunInfo.AppendText("电池寿命:" + Convert.ToString(Data[11]) + " %");
                                 }));
                             }
                             break;
@@ -1159,15 +1159,15 @@ namespace Welling_Motor_Debug_Tool
             for (int i = 0; i < 40; i++)
                 ConfigParam[i] = 0;
             ConfigParam[0] = (byte)((写入存储ToolStripMenuItem.Checked) ? 0x01 : 0x00);
-            ushort uwDataTemp = 0;
+            short wDataTemp = 0;
             string[] strDataTemp = richTextBox_MotorParam.Text.Split(new string[] { ", "},StringSplitOptions.None);
             try
             {
                 for (int i = 0; i < strDataTemp.Length; i++)
                 {
-                    uwDataTemp = Convert.ToUInt16(strDataTemp[i].Split('=')[1]);
-                    ConfigParam[2 * i + 2] = (byte)uwDataTemp;
-                    ConfigParam[2 * i + 3] = (byte)(uwDataTemp >> 8);
+                    wDataTemp = Convert.ToInt16(strDataTemp[i].Split('=')[1]);
+                    ConfigParam[2 * i + 2] = (byte)wDataTemp;
+                    ConfigParam[2 * i + 3] = (byte)(wDataTemp >> 8);
                 }
                 mySerialProcess.SendCmd((ushort)0x751, (byte)0x16, (ushort)0x3B28, ConfigParam);
             }
@@ -1201,15 +1201,15 @@ namespace Welling_Motor_Debug_Tool
             for (int i = 0; i < 28; i++)
                 ConfigParam[i] = 0;
             ConfigParam[0] = (byte)((写入存储ToolStripMenuItem.Checked) ? 0x01 : 0x00);
-            ushort uwDataTemp = 0;
+            short wDataTemp = 0;
             string[] strDataTemp = richTextBox_BikeParam.Text.Split(new string[] { ", " }, StringSplitOptions.None);
             try
             {
                 for (int i = 0; i < strDataTemp.Length; i++)
                 {
-                    uwDataTemp = Convert.ToUInt16(strDataTemp[i].Split('=')[1]);
-                    ConfigParam[2 * i + 2] = (byte)uwDataTemp;
-                    ConfigParam[2 * i + 3] = (byte)(uwDataTemp >> 8);
+                    wDataTemp = Convert.ToInt16(strDataTemp[i].Split('=')[1]);
+                    ConfigParam[2 * i + 2] = (byte)wDataTemp;
+                    ConfigParam[2 * i + 3] = (byte)(wDataTemp >> 8);
                 }
                 mySerialProcess.SendCmd((ushort)0x751, (byte)0x16, (ushort)0x3D1C, ConfigParam);
             }
@@ -1303,7 +1303,7 @@ namespace Welling_Motor_Debug_Tool
             for (int i = 0; i < 80; i++)
                 ConfigParam[i] = 0;
             ConfigParam[0] = (byte)((写入存储ToolStripMenuItem.Checked) ? 0x01 : 0x00);
-            ulong ulDataTemp = 0;
+            long lDataTemp = 0;
             string[] strDataTemp = richTextBox_AssistParam.Text.Split(new string[] { ", " }, StringSplitOptions.None);
             int index_1 = 0, index_2 = 0;
             try
@@ -1326,23 +1326,23 @@ namespace Welling_Motor_Debug_Tool
                 }
                 for (int i = 0; i < strDataTemp.Length; i++)
                 {
-                    ulDataTemp = Convert.ToUInt32(strDataTemp[i].Split('=')[1]);
+                    lDataTemp = Convert.ToInt32(strDataTemp[i].Split('=')[1]);
                     if (i < index_1)
                     {
-                        ConfigParam[2 * i + 4] = (byte)ulDataTemp;
-                        ConfigParam[2 * i + 5] = (byte)(ulDataTemp >> 8);
+                        ConfigParam[2 * i + 4] = (byte)lDataTemp;
+                        ConfigParam[2 * i + 5] = (byte)(lDataTemp >> 8);
                     }
                     else if (i <= index_2)
                     {
-                        ConfigParam[4 * i - 4] = (byte)ulDataTemp;
-                        ConfigParam[4 * i - 3] = (byte)(ulDataTemp >> 8);
-                        ConfigParam[4 * i - 2] = (byte)(ulDataTemp >> 16);
-                        ConfigParam[4 * i - 1] = (byte)(ulDataTemp >> 24);
+                        ConfigParam[4 * i - 4] = (byte)lDataTemp;
+                        ConfigParam[4 * i - 3] = (byte)(lDataTemp >> 8);
+                        ConfigParam[4 * i - 2] = (byte)(lDataTemp >> 16);
+                        ConfigParam[4 * i - 1] = (byte)(lDataTemp >> 24);
                     }
                     else
                     {
-                        ConfigParam[2 * i + 20] = (byte)ulDataTemp;
-                        ConfigParam[2 * i + 21] = (byte)(ulDataTemp >> 8);
+                        ConfigParam[2 * i + 20] = (byte)lDataTemp;
+                        ConfigParam[2 * i + 21] = (byte)(lDataTemp >> 8);
                     }  
                 }
                 mySerialProcess.SendCmd((ushort)0x751, (byte)0x16, (ushort)0x4450, ConfigParam);
@@ -2861,10 +2861,6 @@ namespace Welling_Motor_Debug_Tool
             //转速百分比更新
             label_FacModeMotorSpeedSet.Text = trackBar_FacModeMotorSpeedAdj.Value.ToString() + "%";
             numericUpDown_SpeedAdj.Value = trackBar_FacModeMotorSpeedAdj.Value;
-            //设置转速百分比
-            var Data = new byte[1];
-            Data[0] = (byte)trackBar_FacModeMotorSpeedAdj.Value;
-            mySerialProcess.SendCmd((ushort)0x751, (byte)0x16, (ushort)0x2C01, Data);
         }
 
         /// <summary>

BIN
Welling_Motor_Debug_Tool/bin/Debug/Welling_Motor_Debug_Tool.exe


BIN
Welling_Motor_Debug_Tool/bin/Debug/Welling_Motor_Debug_Tool.pdb


BIN
Welling_Motor_Debug_Tool/bin/Debug/Welling_Motor_Debug_Tool_202305181655.exe


BIN
Welling_Motor_Debug_Tool/obj/Debug/Welling_Motor_Debug_Tool.csproj.GenerateResource.cache


BIN
Welling_Motor_Debug_Tool/obj/Debug/Welling_Motor_Debug_Tool.exe


BIN
Welling_Motor_Debug_Tool/obj/Debug/Welling_Motor_Debug_Tool.pdb