Преглед изворни кода

V2.2.0:
1,优化新增协议内容;
2,增加协议类型选择,支持CAN和UART;
3,针对UART控制器在量产测试过程中增加5S协议设定和联动装置盒波特率设定,以正确接收UART控制器数据和Boot版本信息;
4,基础功能测试控制电机启动由修改运行模式改为Walk模式;
5,量产功能测试增加MOS内阻校准环节,支持可选;
6,增加流水号记录。

Dail пре 1 година
родитељ
комит
ba0ec59214

BIN
.vs/Welling_Motor_Debug_Tool/v17/.suo


+ 3 - 1
Welling_Motor_Debug_Tool/LocalInfo.cs

@@ -12,8 +12,10 @@ namespace Welling_Motor_Debug_Tool
         public string LocalDataPath = "C:\\Temp\\MotorTestTool\\DataLog\\"; //本地数据文件路径
         public string LocalLogPath = "C:\\Temp\\MotorTestTool\\Log\\"; //本地日志文件路径
         public string PC_InfoFileName = "PC_Info.txt";//计算机信息
-        public string ConfigFileName = "Config1.ttcfg"; //配置文件
+        public string ConfigFileName = "Config2.ttcfg"; //配置文件
         public string NoteFileName = "Note.txt";
+        public string SerialNumFileName1 = "serial1";//测试流水号
+        public string SerialNumFileName2 = "serial2";//检验流水号
         public string ToolsPath = "C:\\Temp\\MotorTestTool\\Tools";//工具路径
         public string TorqueSensorFileName = "TorqueSensor.ttcfg"; //配置文件
         public string UsrFileName = "UserAccount1"; //登录配置文件

+ 1 - 1
Welling_Motor_Debug_Tool/Params.cs

@@ -13,7 +13,7 @@ namespace Welling_Motor_Debug_Tool
                                                             "预留1","预留2","预留3","预留4","预留5","预留6"};
         public List<string> BikeParam = new List<string> { "轮胎周长", "电控传动比", "转把模式限速", "推行模式限速", "前牙盘T数", "后牙盘T数",
                                                            "助力方案1", "助力方案2", "前后灯参数","轮胎周长微调","启动模式","开关机参数",
-                                                           "转把限速结束值"};
+                                                           "转把加减速斜率"};
         public List<string> BikeParam2 = new List<string> { "支持无码表","尾灯控制周期","尾灯控制脉宽","限速微调","预留1", "预留2", "预留3", "预留4", "预留5", "预留6", "预留7", "预留8", "预留9", "预留10",
                                                            "预留11","预留12"};
         public List<string> ControlParam = new List<string> {"位置传感器零点","位置传感器当前零点","峰值电流","电流保护阈值","最高档电压保护阈值","最高档欠压保护阈值",

+ 14 - 10
Welling_Motor_Debug_Tool/Version.cs

@@ -17,6 +17,13 @@ namespace Welling_Motor_Debug_Tool
         //修改记录
         string ChangeLog = "修改记录:\r\n" +
             "V" + mainForm.Version + "\r\n" +
+            "1,优化新增协议内容;\r\n" +
+            "2,增加协议类型选择,支持CAN和UART;\r\n" +
+            "3,针对UART控制器在量产测试过程中增加5S协议设定和联动装置盒波特率设定,以正确接收UART控制器数据和Boot版本信息;\r\n" +
+            "4,基础功能测试控制电机启动由修改运行模式改为Walk模式;\r\n" +
+            "5,量产功能测试增加MOS内阻校准环节,支持可选;\r\n" +
+            "6,增加流水号记录。\r\n\r\n" +
+            "V2.1.9\r\n" +
             "1,增加整车信息2、用户骑行参数界面,支持上位机读写;\r\n" +
             "2,增加车架ODO里程写入和读取;\r\n" +
             "3,增加产品标签写入,支持32位字符;\r\n" +
@@ -127,16 +134,13 @@ namespace Welling_Motor_Debug_Tool
                 //检查是否有最新版本
                 string[] VerOld = mainForm.Version.Trim().Split('.');
                 string[] VerNew = arrText[0].ToString().Trim().Split('.');
-                if (Convert.ToInt16(VerNew[0]) <= Convert.ToInt16(VerOld[0]))
+                int VerOld_int = Convert.ToInt32(VerOld[0]) * 10000 + Convert.ToInt32(VerOld[1].PadLeft(2, '0')) * 100 + Convert.ToInt32(VerOld[2].PadLeft(2, '0'));
+                int VerNew_int = Convert.ToInt32(VerNew[0]) * 10000 + Convert.ToInt32(VerNew[1].PadLeft(2, '0')) * 100 + Convert.ToInt32(VerNew[2].PadLeft(2, '0'));
+                if (VerNew_int <= VerOld_int)
                 {
-                    if (Convert.ToInt16(VerNew[1]) <= Convert.ToInt16(VerOld[1]))
-                    {
-                        if (Convert.ToInt16(VerNew[2]) <= Convert.ToInt16(VerOld[2]))
-                        {
-                            MessageBox.Show("版本已是最新", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
-                            return;
-                        }
-                    }
+                    //版本已是最新,跳出
+                    MessageBox.Show("版本已是最新", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);                    
+                    return;
                 }
                 //下载最新版本
                 string SavePath = Directory.GetCurrentDirectory();
@@ -147,7 +151,7 @@ namespace Welling_Motor_Debug_Tool
                     {
                         myFtp.DownloadFile("/Tools/Welling_Motor_Debug_Tool/" + file, SavePath);
                         MessageBox.Show("最新版本下载完成,请手动删除旧版本\r\n最新版本:" + file, "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
-                        return;
+                        System.Environment.Exit(0);
                     }                    
                 }
             }

BIN
Welling_Motor_Debug_Tool/bin/Debug/Welling_Motor_Debug_Tool_V2.1.9.exe


BIN
Welling_Motor_Debug_Tool/bin/Debug/Welling_Motor_Debug_Tool_V2.2.0.exe


+ 303 - 113
Welling_Motor_Debug_Tool/mainForm.Designer.cs

@@ -96,6 +96,9 @@ namespace Welling_Motor_Debug_Tool
             this.电机温度ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
             this.toolStripTextBox_ThT_Motor = new System.Windows.Forms.ToolStripTextBox();
             this.力矩传感器检验ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+            this.协议类型ToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
+            this.cANToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+            this.uARTToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
             this.UART协议ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
             this.协议类型ToolStripMenuItem = new System.Windows.Forms.ToolStripComboBox();
             this.工具箱ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@@ -416,6 +419,8 @@ namespace Welling_Motor_Debug_Tool
             this.button_FacModeInit = new System.Windows.Forms.Button();
             this.tabPage_ProductMode_Write = new System.Windows.Forms.TabPage();
             this.groupBox28 = new System.Windows.Forms.GroupBox();
+            this.label130 = new System.Windows.Forms.Label();
+            this.label_FacModeMosCal = new System.Windows.Forms.Label();
             this.label117 = new System.Windows.Forms.Label();
             this.label_FacModeSpeed = new System.Windows.Forms.Label();
             this.label_FacModeBMS = new System.Windows.Forms.Label();
@@ -454,6 +459,7 @@ namespace Welling_Motor_Debug_Tool
             this.comboBox_FacModeCfgFile = new System.Windows.Forms.ComboBox();
             this.comboBox_FacModeCfgDate = new System.Windows.Forms.ComboBox();
             this.groupBox2 = new System.Windows.Forms.GroupBox();
+            this.checkBox_FacMode_MosCal = new System.Windows.Forms.CheckBox();
             this.pictureBox_WriteLock = new System.Windows.Forms.PictureBox();
             this.checkBox_FacCad = new System.Windows.Forms.CheckBox();
             this.checkBox_FacLightTest = new System.Windows.Forms.CheckBox();
@@ -589,12 +595,23 @@ namespace Welling_Motor_Debug_Tool
             this.label_UserName = new System.Windows.Forms.Label();
             this.label124 = new System.Windows.Forms.Label();
             this.label46 = new System.Windows.Forms.Label();
-            this.checkBox_FacMode_MosCal = new System.Windows.Forms.CheckBox();
-            this.label130 = new System.Windows.Forms.Label();
-            this.label_FacModeMosCal = new System.Windows.Forms.Label();
-            this.协议类型ToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
-            this.cANToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
-            this.uARTToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+            this.label131 = new System.Windows.Forms.Label();
+            this.label_FacModeSerial = new System.Windows.Forms.Label();
+            this.label_CheckModeSerial = new System.Windows.Forms.Label();
+            this.label135 = new System.Windows.Forms.Label();
+            this.mOS内阻校准系数ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+            this.toolStripTextBox_MosCalK = new System.Windows.Forms.ToolStripTextBox();
+            this.mOS内阻范围ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+            this.mOS1ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+            this.mOS2ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+            this.mOS3ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+            this.toolStripTextBox_MOS1 = new System.Windows.Forms.ToolStripTextBox();
+            this.toolStripTextBox_MOS2 = new System.Windows.Forms.ToolStripTextBox();
+            this.toolStripTextBox_MOS3 = new System.Windows.Forms.ToolStripTextBox();
+            this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
+            this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
+            this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator();
+            this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator();
             this.menuStrip_Set.SuspendLayout();
             this.statusStrip1.SuspendLayout();
             this.groupBox1.SuspendLayout();
@@ -797,14 +814,14 @@ namespace Welling_Motor_Debug_Tool
             // 开机ToolStripMenuItem
             // 
             this.开机ToolStripMenuItem.Name = "开机ToolStripMenuItem";
-            this.开机ToolStripMenuItem.Size = new System.Drawing.Size(112, 26);
+            this.开机ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
             this.开机ToolStripMenuItem.Text = "开机";
             this.开机ToolStripMenuItem.Click += new System.EventHandler(this.开机ToolStripMenuItem_Click);
             // 
             // 关机ToolStripMenuItem
             // 
             this.关机ToolStripMenuItem.Name = "关机ToolStripMenuItem";
-            this.关机ToolStripMenuItem.Size = new System.Drawing.Size(112, 26);
+            this.关机ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
             this.关机ToolStripMenuItem.Text = "关机";
             this.关机ToolStripMenuItem.Click += new System.EventHandler(this.关机ToolStripMenuItem_Click);
             // 
@@ -812,12 +829,18 @@ namespace Welling_Motor_Debug_Tool
             // 
             this.配置ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
             this.写入存储ToolStripMenuItem,
+            this.toolStripSeparator2,
             this.离线使用ToolStripMenuItem,
             this.服务器配置ToolStripMenuItem,
+            this.toolStripSeparator3,
             this.生产信息ToolStripMenuItem,
             this.电机类型ToolStripMenuItem,
+            this.toolStripSeparator4,
             this.判断阈值ToolStripMenuItem,
             this.力矩传感器检验ToolStripMenuItem,
+            this.mOS内阻校准系数ToolStripMenuItem,
+            this.mOS内阻范围ToolStripMenuItem,
+            this.toolStripSeparator5,
             this.协议类型ToolStripMenuItem1,
             this.UART协议ToolStripMenuItem});
             this.配置ToolStripMenuItem.ForeColor = System.Drawing.Color.White;
@@ -830,7 +853,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(192, 26);
+            this.写入存储ToolStripMenuItem.Size = new System.Drawing.Size(214, 26);
             this.写入存储ToolStripMenuItem.Text = "写入时执行保存";
             this.写入存储ToolStripMenuItem.Click += new System.EventHandler(this.写入存储ToolStripMenuItem_Click);
             // 
@@ -840,13 +863,13 @@ namespace Welling_Motor_Debug_Tool
             this.允许ToolStripMenuItem,
             this.不允许ToolStripMenuItem});
             this.离线使用ToolStripMenuItem.Name = "离线使用ToolStripMenuItem";
-            this.离线使用ToolStripMenuItem.Size = new System.Drawing.Size(192, 26);
+            this.离线使用ToolStripMenuItem.Size = new System.Drawing.Size(214, 26);
             this.离线使用ToolStripMenuItem.Text = "离线使用";
             // 
             // 允许ToolStripMenuItem
             // 
             this.允许ToolStripMenuItem.Name = "允许ToolStripMenuItem";
-            this.允许ToolStripMenuItem.Size = new System.Drawing.Size(128, 26);
+            this.允许ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
             this.允许ToolStripMenuItem.Text = "允许";
             this.允许ToolStripMenuItem.Click += new System.EventHandler(this.允许ToolStripMenuItem_Click);
             // 
@@ -855,7 +878,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(128, 26);
+            this.不允许ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
             this.不允许ToolStripMenuItem.Text = "不允许";
             this.不允许ToolStripMenuItem.Click += new System.EventHandler(this.不允许ToolStripMenuItem_Click);
             // 
@@ -868,7 +891,7 @@ namespace Welling_Motor_Debug_Tool
             this.密码ToolStripMenuItem,
             this.存储路径ToolStripMenuItem});
             this.服务器配置ToolStripMenuItem.Name = "服务器配置ToolStripMenuItem";
-            this.服务器配置ToolStripMenuItem.Size = new System.Drawing.Size(192, 26);
+            this.服务器配置ToolStripMenuItem.Size = new System.Drawing.Size(214, 26);
             this.服务器配置ToolStripMenuItem.Text = "FTP服务器配置";
             // 
             // IP地址ToolStripMenuItem
@@ -876,7 +899,7 @@ namespace Welling_Motor_Debug_Tool
             this.IP地址ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
             this.toolStripTextBox_ServerIP});
             this.IP地址ToolStripMenuItem.Name = "IP地址ToolStripMenuItem";
-            this.IP地址ToolStripMenuItem.Size = new System.Drawing.Size(144, 26);
+            this.IP地址ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
             this.IP地址ToolStripMenuItem.Text = "IP地址";
             // 
             // toolStripTextBox_ServerIP
@@ -892,7 +915,7 @@ namespace Welling_Motor_Debug_Tool
             this.端口ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
             this.toolStripTextBox_ServerPort});
             this.端口ToolStripMenuItem.Name = "端口ToolStripMenuItem";
-            this.端口ToolStripMenuItem.Size = new System.Drawing.Size(144, 26);
+            this.端口ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
             this.端口ToolStripMenuItem.Text = "端口";
             // 
             // toolStripTextBox_ServerPort
@@ -908,7 +931,7 @@ namespace Welling_Motor_Debug_Tool
             this.用户名ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
             this.toolStripTextBox_ServerUser});
             this.用户名ToolStripMenuItem.Name = "用户名ToolStripMenuItem";
-            this.用户名ToolStripMenuItem.Size = new System.Drawing.Size(144, 26);
+            this.用户名ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
             this.用户名ToolStripMenuItem.Text = "用户名";
             // 
             // toolStripTextBox_ServerUser
@@ -924,7 +947,7 @@ namespace Welling_Motor_Debug_Tool
             this.密码ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
             this.toolStripTextBox_ServerPasswd});
             this.密码ToolStripMenuItem.Name = "密码ToolStripMenuItem";
-            this.密码ToolStripMenuItem.Size = new System.Drawing.Size(144, 26);
+            this.密码ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
             this.密码ToolStripMenuItem.Text = "密码";
             // 
             // toolStripTextBox_ServerPasswd
@@ -940,7 +963,7 @@ namespace Welling_Motor_Debug_Tool
             this.存储路径ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
             this.toolStripTextBox_ServerPath});
             this.存储路径ToolStripMenuItem.Name = "存储路径ToolStripMenuItem";
-            this.存储路径ToolStripMenuItem.Size = new System.Drawing.Size(144, 26);
+            this.存储路径ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
             this.存储路径ToolStripMenuItem.Text = "存储路径";
             // 
             // toolStripTextBox_ServerPath
@@ -959,7 +982,7 @@ namespace Welling_Motor_Debug_Tool
             this.生产日期ToolStripMenuItem,
             this.产品标识ToolStripMenuItem});
             this.生产信息ToolStripMenuItem.Name = "生产信息ToolStripMenuItem";
-            this.生产信息ToolStripMenuItem.Size = new System.Drawing.Size(192, 26);
+            this.生产信息ToolStripMenuItem.Size = new System.Drawing.Size(214, 26);
             this.生产信息ToolStripMenuItem.Text = "生产信息";
             // 
             // 生产商ToolStripMenuItem
@@ -967,7 +990,7 @@ namespace Welling_Motor_Debug_Tool
             this.生产商ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
             this.toolStripTextBox_MAC});
             this.生产商ToolStripMenuItem.Name = "生产商ToolStripMenuItem";
-            this.生产商ToolStripMenuItem.Size = new System.Drawing.Size(144, 26);
+            this.生产商ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
             this.生产商ToolStripMenuItem.Text = "生产商";
             // 
             // toolStripTextBox_MAC
@@ -983,7 +1006,7 @@ namespace Welling_Motor_Debug_Tool
             this.生产地ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
             this.toolStripTextBoxMACAddr});
             this.生产地ToolStripMenuItem.Name = "生产地ToolStripMenuItem";
-            this.生产地ToolStripMenuItem.Size = new System.Drawing.Size(144, 26);
+            this.生产地ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
             this.生产地ToolStripMenuItem.Text = "生产地";
             // 
             // toolStripTextBoxMACAddr
@@ -999,7 +1022,7 @@ namespace Welling_Motor_Debug_Tool
             this.生产日期ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
             this.toolStripTextBox_MACDate});
             this.生产日期ToolStripMenuItem.Name = "生产日期ToolStripMenuItem";
-            this.生产日期ToolStripMenuItem.Size = new System.Drawing.Size(144, 26);
+            this.生产日期ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
             this.生产日期ToolStripMenuItem.Text = "生产日期";
             // 
             // toolStripTextBox_MACDate
@@ -1015,7 +1038,7 @@ namespace Welling_Motor_Debug_Tool
             this.产品标识ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
             this.toolStripTextBox_MACPD});
             this.产品标识ToolStripMenuItem.Name = "产品标识ToolStripMenuItem";
-            this.产品标识ToolStripMenuItem.Size = new System.Drawing.Size(144, 26);
+            this.产品标识ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
             this.产品标识ToolStripMenuItem.Text = "产品标识";
             // 
             // toolStripTextBox_MACPD
@@ -1032,7 +1055,7 @@ namespace Welling_Motor_Debug_Tool
             this.中置电机ToolStripMenuItem,
             this.轮毂电机ToolStripMenuItem});
             this.电机类型ToolStripMenuItem.Name = "电机类型ToolStripMenuItem";
-            this.电机类型ToolStripMenuItem.Size = new System.Drawing.Size(192, 26);
+            this.电机类型ToolStripMenuItem.Size = new System.Drawing.Size(214, 26);
             this.电机类型ToolStripMenuItem.Text = "电机类型";
             // 
             // 中置电机ToolStripMenuItem
@@ -1040,14 +1063,14 @@ 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(144, 26);
+            this.中置电机ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
             this.中置电机ToolStripMenuItem.Text = "中置电机";
             this.中置电机ToolStripMenuItem.Click += new System.EventHandler(this.中置电机ToolStripMenuItem_Click);
             // 
             // 轮毂电机ToolStripMenuItem
             // 
             this.轮毂电机ToolStripMenuItem.Name = "轮毂电机ToolStripMenuItem";
-            this.轮毂电机ToolStripMenuItem.Size = new System.Drawing.Size(144, 26);
+            this.轮毂电机ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
             this.轮毂电机ToolStripMenuItem.Text = "轮毂电机";
             this.轮毂电机ToolStripMenuItem.Click += new System.EventHandler(this.轮毂电机ToolStripMenuItem_Click);
             // 
@@ -1064,7 +1087,7 @@ namespace Welling_Motor_Debug_Tool
             this.mCU温度ToolStripMenuItem,
             this.电机温度ToolStripMenuItem});
             this.判断阈值ToolStripMenuItem.Name = "判断阈值ToolStripMenuItem";
-            this.判断阈值ToolStripMenuItem.Size = new System.Drawing.Size(192, 26);
+            this.判断阈值ToolStripMenuItem.Size = new System.Drawing.Size(214, 26);
             this.判断阈值ToolStripMenuItem.Text = "判断阈值";
             // 
             // 电压ToolStripMenuItem
@@ -1072,7 +1095,7 @@ namespace Welling_Motor_Debug_Tool
             this.电压ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
             this.toolStripTextBox_ThVol});
             this.电压ToolStripMenuItem.Name = "电压ToolStripMenuItem";
-            this.电压ToolStripMenuItem.Size = new System.Drawing.Size(151, 26);
+            this.电压ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
             this.电压ToolStripMenuItem.Text = "电压";
             // 
             // toolStripTextBox_ThVol
@@ -1088,7 +1111,7 @@ namespace Welling_Motor_Debug_Tool
             this.电流ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
             this.toolStripTextBox_ThCur});
             this.电流ToolStripMenuItem.Name = "电流ToolStripMenuItem";
-            this.电流ToolStripMenuItem.Size = new System.Drawing.Size(151, 26);
+            this.电流ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
             this.电流ToolStripMenuItem.Text = "电流";
             // 
             // toolStripTextBox_ThCur
@@ -1104,7 +1127,7 @@ namespace Welling_Motor_Debug_Tool
             this.转速ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
             this.toolStripTextBox_ThSpeed});
             this.转速ToolStripMenuItem.Name = "转速ToolStripMenuItem";
-            this.转速ToolStripMenuItem.Size = new System.Drawing.Size(151, 26);
+            this.转速ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
             this.转速ToolStripMenuItem.Text = "转速";
             // 
             // toolStripTextBox_ThSpeed
@@ -1112,7 +1135,7 @@ namespace Welling_Motor_Debug_Tool
             this.toolStripTextBox_ThSpeed.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.toolStripTextBox_ThSpeed.Name = "toolStripTextBox_ThSpeed";
             this.toolStripTextBox_ThSpeed.Size = new System.Drawing.Size(100, 28);
-            this.toolStripTextBox_ThSpeed.Text = "500,1500";
+            this.toolStripTextBox_ThSpeed.Text = "500,2500";
             this.toolStripTextBox_ThSpeed.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ConfigFileSave_KeyDown);
             // 
             // 力矩ToolStripMenuItem
@@ -1120,7 +1143,7 @@ namespace Welling_Motor_Debug_Tool
             this.力矩ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
             this.toolStripTextBox_ThTor});
             this.力矩ToolStripMenuItem.Name = "力矩ToolStripMenuItem";
-            this.力矩ToolStripMenuItem.Size = new System.Drawing.Size(151, 26);
+            this.力矩ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
             this.力矩ToolStripMenuItem.Text = "力矩";
             // 
             // toolStripTextBox_ThTor
@@ -1128,7 +1151,7 @@ namespace Welling_Motor_Debug_Tool
             this.toolStripTextBox_ThTor.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.toolStripTextBox_ThTor.Name = "toolStripTextBox_ThTor";
             this.toolStripTextBox_ThTor.Size = new System.Drawing.Size(100, 28);
-            this.toolStripTextBox_ThTor.Text = "70,80";
+            this.toolStripTextBox_ThTor.Text = "60,80";
             this.toolStripTextBox_ThTor.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ConfigFileSave_KeyDown);
             // 
             // 踏频ToolStripMenuItem
@@ -1136,7 +1159,7 @@ namespace Welling_Motor_Debug_Tool
             this.踏频ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
             this.toolStripTextBox_ThCad});
             this.踏频ToolStripMenuItem.Name = "踏频ToolStripMenuItem";
-            this.踏频ToolStripMenuItem.Size = new System.Drawing.Size(151, 26);
+            this.踏频ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
             this.踏频ToolStripMenuItem.Text = "踏频";
             // 
             // toolStripTextBox_ThCad
@@ -1144,7 +1167,7 @@ namespace Welling_Motor_Debug_Tool
             this.toolStripTextBox_ThCad.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F);
             this.toolStripTextBox_ThCad.Name = "toolStripTextBox_ThCad";
             this.toolStripTextBox_ThCad.Size = new System.Drawing.Size(100, 28);
-            this.toolStripTextBox_ThCad.Text = "30,50";
+            this.toolStripTextBox_ThCad.Text = "25,75";
             this.toolStripTextBox_ThCad.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ConfigFileSave_KeyDown);
             // 
             // 车速ToolStripMenuItem
@@ -1152,7 +1175,7 @@ namespace Welling_Motor_Debug_Tool
             this.车速ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
             this.toolStripTextBox_ThBikeSpeed});
             this.车速ToolStripMenuItem.Name = "车速ToolStripMenuItem";
-            this.车速ToolStripMenuItem.Size = new System.Drawing.Size(151, 26);
+            this.车速ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
             this.车速ToolStripMenuItem.Text = "车速";
             // 
             // toolStripTextBox_ThBikeSpeed
@@ -1160,7 +1183,7 @@ namespace Welling_Motor_Debug_Tool
             this.toolStripTextBox_ThBikeSpeed.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F);
             this.toolStripTextBox_ThBikeSpeed.Name = "toolStripTextBox_ThBikeSpeed";
             this.toolStripTextBox_ThBikeSpeed.Size = new System.Drawing.Size(100, 28);
-            this.toolStripTextBox_ThBikeSpeed.Text = "20,40";
+            this.toolStripTextBox_ThBikeSpeed.Text = "15,40";
             this.toolStripTextBox_ThBikeSpeed.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ConfigFileSave_KeyDown);
             // 
             // pCB温度ToolStripMenuItem
@@ -1168,7 +1191,7 @@ namespace Welling_Motor_Debug_Tool
             this.pCB温度ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
             this.toolStripTextBox_ThT_PCB});
             this.pCB温度ToolStripMenuItem.Name = "pCB温度ToolStripMenuItem";
-            this.pCB温度ToolStripMenuItem.Size = new System.Drawing.Size(151, 26);
+            this.pCB温度ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
             this.pCB温度ToolStripMenuItem.Text = "PCB温度";
             // 
             // toolStripTextBox_ThT_PCB
@@ -1184,7 +1207,7 @@ namespace Welling_Motor_Debug_Tool
             this.mCU温度ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
             this.toolStripTextBox_ThT_MCU});
             this.mCU温度ToolStripMenuItem.Name = "mCU温度ToolStripMenuItem";
-            this.mCU温度ToolStripMenuItem.Size = new System.Drawing.Size(151, 26);
+            this.mCU温度ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
             this.mCU温度ToolStripMenuItem.Text = "MCU温度";
             // 
             // toolStripTextBox_ThT_MCU
@@ -1200,7 +1223,7 @@ namespace Welling_Motor_Debug_Tool
             this.电机温度ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
             this.toolStripTextBox_ThT_Motor});
             this.电机温度ToolStripMenuItem.Name = "电机温度ToolStripMenuItem";
-            this.电机温度ToolStripMenuItem.Size = new System.Drawing.Size(151, 26);
+            this.电机温度ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
             this.电机温度ToolStripMenuItem.Text = "电机温度";
             // 
             // toolStripTextBox_ThT_Motor
@@ -1214,16 +1237,41 @@ namespace Welling_Motor_Debug_Tool
             // 力矩传感器检验ToolStripMenuItem
             // 
             this.力矩传感器检验ToolStripMenuItem.Name = "力矩传感器检验ToolStripMenuItem";
-            this.力矩传感器检验ToolStripMenuItem.Size = new System.Drawing.Size(192, 26);
+            this.力矩传感器检验ToolStripMenuItem.Size = new System.Drawing.Size(214, 26);
             this.力矩传感器检验ToolStripMenuItem.Text = "力矩检验参数";
             this.力矩传感器检验ToolStripMenuItem.Click += new System.EventHandler(this.力矩传感器检验ToolStripMenuItem_Click);
             // 
+            // 协议类型ToolStripMenuItem1
+            // 
+            this.协议类型ToolStripMenuItem1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
+            this.cANToolStripMenuItem,
+            this.uARTToolStripMenuItem});
+            this.协议类型ToolStripMenuItem1.Name = "协议类型ToolStripMenuItem1";
+            this.协议类型ToolStripMenuItem1.Size = new System.Drawing.Size(214, 26);
+            this.协议类型ToolStripMenuItem1.Text = "协议类型";
+            // 
+            // cANToolStripMenuItem
+            // 
+            this.cANToolStripMenuItem.Checked = true;
+            this.cANToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked;
+            this.cANToolStripMenuItem.Name = "cANToolStripMenuItem";
+            this.cANToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
+            this.cANToolStripMenuItem.Text = "CAN";
+            this.cANToolStripMenuItem.Click += new System.EventHandler(this.cANToolStripMenuItem_Click);
+            // 
+            // uARTToolStripMenuItem
+            // 
+            this.uARTToolStripMenuItem.Name = "uARTToolStripMenuItem";
+            this.uARTToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
+            this.uARTToolStripMenuItem.Text = "UART";
+            this.uARTToolStripMenuItem.Click += new System.EventHandler(this.uARTToolStripMenuItem_Click);
+            // 
             // UART协议ToolStripMenuItem
             // 
             this.UART协议ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
             this.协议类型ToolStripMenuItem});
             this.UART协议ToolStripMenuItem.Name = "UART协议ToolStripMenuItem";
-            this.UART协议ToolStripMenuItem.Size = new System.Drawing.Size(192, 26);
+            this.UART协议ToolStripMenuItem.Size = new System.Drawing.Size(214, 26);
             this.UART协议ToolStripMenuItem.Text = "UART协议设置";
             this.UART协议ToolStripMenuItem.Visible = false;
             // 
@@ -1258,28 +1306,28 @@ namespace Welling_Motor_Debug_Tool
             // 运行信息记录ToolStripMenuItem
             // 
             this.运行信息记录ToolStripMenuItem.Name = "运行信息记录ToolStripMenuItem";
-            this.运行信息记录ToolStripMenuItem.Size = new System.Drawing.Size(176, 26);
+            this.运行信息记录ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
             this.运行信息记录ToolStripMenuItem.Text = "自动记录";
             this.运行信息记录ToolStripMenuItem.Click += new System.EventHandler(this.记录数据ToolStripMenuItem_Click);
             // 
             // 计算器ToolStripMenuItem
             // 
             this.计算器ToolStripMenuItem.Name = "计算器ToolStripMenuItem";
-            this.计算器ToolStripMenuItem.Size = new System.Drawing.Size(176, 26);
+            this.计算器ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
             this.计算器ToolStripMenuItem.Text = "计算器";
             this.计算器ToolStripMenuItem.Click += new System.EventHandler(this.计算器ToolStripMenuItem_Click);
             // 
             // 页面保存ToolStripMenuItem
             // 
             this.页面保存ToolStripMenuItem.Name = "页面保存ToolStripMenuItem";
-            this.页面保存ToolStripMenuItem.Size = new System.Drawing.Size(176, 26);
+            this.页面保存ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
             this.页面保存ToolStripMenuItem.Text = "页面保存";
             this.页面保存ToolStripMenuItem.Click += new System.EventHandler(this.页面保存ToolStripMenuItem_Click);
             // 
             // 屏幕键盘ToolStripMenuItem
             // 
             this.屏幕键盘ToolStripMenuItem.Name = "屏幕键盘ToolStripMenuItem";
-            this.屏幕键盘ToolStripMenuItem.Size = new System.Drawing.Size(176, 26);
+            this.屏幕键盘ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
             this.屏幕键盘ToolStripMenuItem.Text = "屏幕键盘";
             this.屏幕键盘ToolStripMenuItem.Click += new System.EventHandler(this.屏幕键盘ToolStripMenuItem_Click);
             // 
@@ -1289,7 +1337,7 @@ namespace Welling_Motor_Debug_Tool
             this.生产配置文件ToolStripMenuItem,
             this.样机测试记录ToolStripMenuItem});
             this.删除远程文件ToolStripMenuItem.Name = "删除远程文件ToolStripMenuItem";
-            this.删除远程文件ToolStripMenuItem.Size = new System.Drawing.Size(176, 26);
+            this.删除远程文件ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
             this.删除远程文件ToolStripMenuItem.Text = "删除远程文件";
             // 
             // 生产配置文件ToolStripMenuItem
@@ -1297,7 +1345,7 @@ namespace Welling_Motor_Debug_Tool
             this.生产配置文件ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
             this.toolStripTextBox_DelCfgFile});
             this.生产配置文件ToolStripMenuItem.Name = "生产配置文件ToolStripMenuItem";
-            this.生产配置文件ToolStripMenuItem.Size = new System.Drawing.Size(176, 26);
+            this.生产配置文件ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
             this.生产配置文件ToolStripMenuItem.Text = "生产配置文件";
             // 
             // toolStripTextBox_DelCfgFile
@@ -1313,7 +1361,7 @@ namespace Welling_Motor_Debug_Tool
             this.样机测试记录ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
             this.toolStripTextBox_DelLogFile});
             this.样机测试记录ToolStripMenuItem.Name = "样机测试记录ToolStripMenuItem";
-            this.样机测试记录ToolStripMenuItem.Size = new System.Drawing.Size(176, 26);
+            this.样机测试记录ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
             this.样机测试记录ToolStripMenuItem.Text = "样机测试记录";
             // 
             // toolStripTextBox_DelLogFile
@@ -1328,7 +1376,7 @@ namespace Welling_Motor_Debug_Tool
             // 
             this.指令调试ToolStripMenuItem.Enabled = false;
             this.指令调试ToolStripMenuItem.Name = "指令调试ToolStripMenuItem";
-            this.指令调试ToolStripMenuItem.Size = new System.Drawing.Size(176, 26);
+            this.指令调试ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
             this.指令调试ToolStripMenuItem.Text = "指令调试";
             // 
             // 查询ToolStripMenuItem
@@ -4711,6 +4759,8 @@ namespace Welling_Motor_Debug_Tool
             this.tabPage_ProductMode_Write.Controls.Add(this.checkBox_OffLineFacMode);
             this.tabPage_ProductMode_Write.Controls.Add(this.label_FacModeResult);
             this.tabPage_ProductMode_Write.Controls.Add(this.label111);
+            this.tabPage_ProductMode_Write.Controls.Add(this.label_FacModeSerial);
+            this.tabPage_ProductMode_Write.Controls.Add(this.label131);
             this.tabPage_ProductMode_Write.Location = new System.Drawing.Point(4, 30);
             this.tabPage_ProductMode_Write.Name = "tabPage_ProductMode_Write";
             this.tabPage_ProductMode_Write.Size = new System.Drawing.Size(990, 315);
@@ -4760,6 +4810,29 @@ namespace Welling_Motor_Debug_Tool
             this.groupBox28.TabStop = false;
             this.groupBox28.Text = "测试状态";
             // 
+            // label130
+            // 
+            this.label130.AutoSize = true;
+            this.label130.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label130.ForeColor = System.Drawing.SystemColors.ControlText;
+            this.label130.Location = new System.Drawing.Point(6, 216);
+            this.label130.Name = "label130";
+            this.label130.Size = new System.Drawing.Size(85, 17);
+            this.label130.TabIndex = 26;
+            this.label130.Text = "MOS内阻校准";
+            this.label130.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+            // 
+            // label_FacModeMosCal
+            // 
+            this.label_FacModeMosCal.BackColor = System.Drawing.Color.Red;
+            this.label_FacModeMosCal.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label_FacModeMosCal.ForeColor = System.Drawing.SystemColors.ControlText;
+            this.label_FacModeMosCal.Location = new System.Drawing.Point(95, 218);
+            this.label_FacModeMosCal.Name = "label_FacModeMosCal";
+            this.label_FacModeMosCal.Size = new System.Drawing.Size(12, 12);
+            this.label_FacModeMosCal.TabIndex = 27;
+            this.label_FacModeMosCal.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+            // 
             // label117
             // 
             this.label117.AutoSize = true;
@@ -5154,6 +5227,7 @@ namespace Welling_Motor_Debug_Tool
             // button__FacMode_Start
             // 
             this.button__FacMode_Start.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(113)))), ((int)(((byte)(185)))));
+            this.button__FacMode_Start.Font = new System.Drawing.Font("Microsoft YaHei UI", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.button__FacMode_Start.ForeColor = System.Drawing.Color.White;
             this.button__FacMode_Start.Location = new System.Drawing.Point(551, 35);
             this.button__FacMode_Start.Name = "button__FacMode_Start";
@@ -5207,6 +5281,20 @@ namespace Welling_Motor_Debug_Tool
             this.groupBox2.TabStop = false;
             this.groupBox2.Text = "测试项目";
             // 
+            // checkBox_FacMode_MosCal
+            // 
+            this.checkBox_FacMode_MosCal.AutoSize = true;
+            this.checkBox_FacMode_MosCal.Checked = true;
+            this.checkBox_FacMode_MosCal.CheckState = System.Windows.Forms.CheckState.Checked;
+            this.checkBox_FacMode_MosCal.Enabled = false;
+            this.checkBox_FacMode_MosCal.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.checkBox_FacMode_MosCal.Location = new System.Drawing.Point(6, 106);
+            this.checkBox_FacMode_MosCal.Name = "checkBox_FacMode_MosCal";
+            this.checkBox_FacMode_MosCal.Size = new System.Drawing.Size(104, 21);
+            this.checkBox_FacMode_MosCal.TabIndex = 8;
+            this.checkBox_FacMode_MosCal.Text = "MOS内阻校准";
+            this.checkBox_FacMode_MosCal.UseVisualStyleBackColor = true;
+            // 
             // pictureBox_WriteLock
             // 
             this.pictureBox_WriteLock.Image = global::Welling_Motor_Debug_Tool.Properties.Resources.Lock;
@@ -5370,11 +5458,11 @@ namespace Welling_Motor_Debug_Tool
             // label_FacModeStatus
             // 
             this.label_FacModeStatus.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
-            this.label_FacModeStatus.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label_FacModeStatus.Font = new System.Drawing.Font("Microsoft YaHei UI", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label_FacModeStatus.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(113)))), ((int)(((byte)(185)))));
             this.label_FacModeStatus.Location = new System.Drawing.Point(783, 38);
             this.label_FacModeStatus.Name = "label_FacModeStatus";
-            this.label_FacModeStatus.Size = new System.Drawing.Size(198, 29);
+            this.label_FacModeStatus.Size = new System.Drawing.Size(132, 29);
             this.label_FacModeStatus.TabIndex = 5;
             this.label_FacModeStatus.Text = "测试结束";
             this.label_FacModeStatus.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@@ -5383,10 +5471,10 @@ namespace Welling_Motor_Debug_Tool
             // 
             this.checkBox_OffLineFacMode.AutoSize = true;
             this.checkBox_OffLineFacMode.Enabled = false;
-            this.checkBox_OffLineFacMode.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.checkBox_OffLineFacMode.Location = new System.Drawing.Point(920, 8);
+            this.checkBox_OffLineFacMode.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.checkBox_OffLineFacMode.Location = new System.Drawing.Point(930, 6);
             this.checkBox_OffLineFacMode.Name = "checkBox_OffLineFacMode";
-            this.checkBox_OffLineFacMode.Size = new System.Drawing.Size(61, 25);
+            this.checkBox_OffLineFacMode.Size = new System.Drawing.Size(51, 21);
             this.checkBox_OffLineFacMode.TabIndex = 0;
             this.checkBox_OffLineFacMode.Text = "本地";
             this.checkBox_OffLineFacMode.UseVisualStyleBackColor = true;
@@ -5395,7 +5483,7 @@ namespace Welling_Motor_Debug_Tool
             // label_FacModeResult
             // 
             this.label_FacModeResult.BackColor = System.Drawing.Color.Green;
-            this.label_FacModeResult.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label_FacModeResult.Font = new System.Drawing.Font("Microsoft YaHei UI", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label_FacModeResult.ForeColor = System.Drawing.Color.White;
             this.label_FacModeResult.Location = new System.Drawing.Point(657, 38);
             this.label_FacModeResult.Name = "label_FacModeResult";
@@ -5419,6 +5507,8 @@ namespace Welling_Motor_Debug_Tool
             // tabPage_ProductMode_Read
             // 
             this.tabPage_ProductMode_Read.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
+            this.tabPage_ProductMode_Read.Controls.Add(this.label_CheckModeSerial);
+            this.tabPage_ProductMode_Read.Controls.Add(this.label135);
             this.tabPage_ProductMode_Read.Controls.Add(this.checkBox_OffLineCheckMode);
             this.tabPage_ProductMode_Read.Controls.Add(this.comboBox_CheckModeCfgFile);
             this.tabPage_ProductMode_Read.Controls.Add(this.groupBox31);
@@ -5441,10 +5531,10 @@ namespace Welling_Motor_Debug_Tool
             // 
             this.checkBox_OffLineCheckMode.AutoSize = true;
             this.checkBox_OffLineCheckMode.Enabled = false;
-            this.checkBox_OffLineCheckMode.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.checkBox_OffLineCheckMode.Location = new System.Drawing.Point(920, 8);
+            this.checkBox_OffLineCheckMode.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.checkBox_OffLineCheckMode.Location = new System.Drawing.Point(930, 6);
             this.checkBox_OffLineCheckMode.Name = "checkBox_OffLineCheckMode";
-            this.checkBox_OffLineCheckMode.Size = new System.Drawing.Size(61, 25);
+            this.checkBox_OffLineCheckMode.Size = new System.Drawing.Size(51, 21);
             this.checkBox_OffLineCheckMode.TabIndex = 21;
             this.checkBox_OffLineCheckMode.Text = "本地";
             this.checkBox_OffLineCheckMode.UseVisualStyleBackColor = true;
@@ -5713,6 +5803,7 @@ namespace Welling_Motor_Debug_Tool
             // button_CheckModeStart
             // 
             this.button_CheckModeStart.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(113)))), ((int)(((byte)(185)))));
+            this.button_CheckModeStart.Font = new System.Drawing.Font("Microsoft YaHei UI", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.button_CheckModeStart.ForeColor = System.Drawing.Color.White;
             this.button_CheckModeStart.Location = new System.Drawing.Point(551, 35);
             this.button_CheckModeStart.Name = "button_CheckModeStart";
@@ -5748,11 +5839,11 @@ namespace Welling_Motor_Debug_Tool
             // label_CheckModeStatus
             // 
             this.label_CheckModeStatus.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
-            this.label_CheckModeStatus.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label_CheckModeStatus.Font = new System.Drawing.Font("Microsoft YaHei UI", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label_CheckModeStatus.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(113)))), ((int)(((byte)(185)))));
             this.label_CheckModeStatus.Location = new System.Drawing.Point(783, 38);
             this.label_CheckModeStatus.Name = "label_CheckModeStatus";
-            this.label_CheckModeStatus.Size = new System.Drawing.Size(198, 29);
+            this.label_CheckModeStatus.Size = new System.Drawing.Size(132, 29);
             this.label_CheckModeStatus.TabIndex = 11;
             this.label_CheckModeStatus.Text = "测试结束";
             this.label_CheckModeStatus.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@@ -5760,7 +5851,7 @@ namespace Welling_Motor_Debug_Tool
             // label_CheckModeResult
             // 
             this.label_CheckModeResult.BackColor = System.Drawing.Color.Green;
-            this.label_CheckModeResult.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label_CheckModeResult.Font = new System.Drawing.Font("Microsoft YaHei UI", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label_CheckModeResult.ForeColor = System.Drawing.Color.White;
             this.label_CheckModeResult.Location = new System.Drawing.Point(657, 38);
             this.label_CheckModeResult.Name = "label_CheckModeResult";
@@ -6690,67 +6781,149 @@ namespace Welling_Motor_Debug_Tool
             this.label46.TabIndex = 21;
             this.label46.Text = "/";
             // 
-            // checkBox_FacMode_MosCal
+            // label131
+            // 
+            this.label131.AutoSize = true;
+            this.label131.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label131.ForeColor = System.Drawing.SystemColors.ControlText;
+            this.label131.Location = new System.Drawing.Point(930, 32);
+            this.label131.Name = "label131";
+            this.label131.Size = new System.Drawing.Size(44, 17);
+            this.label131.TabIndex = 12;
+            this.label131.Text = "流水号";
+            this.label131.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+            this.label131.DoubleClick += new System.EventHandler(this.label131_DoubleClick);
+            // 
+            // label_FacModeSerial
+            // 
+            this.label_FacModeSerial.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
+            this.label_FacModeSerial.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label_FacModeSerial.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(113)))), ((int)(((byte)(185)))));
+            this.label_FacModeSerial.Location = new System.Drawing.Point(920, 53);
+            this.label_FacModeSerial.Name = "label_FacModeSerial";
+            this.label_FacModeSerial.Size = new System.Drawing.Size(65, 15);
+            this.label_FacModeSerial.TabIndex = 12;
+            this.label_FacModeSerial.Text = "0";
+            this.label_FacModeSerial.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+            // 
+            // label_CheckModeSerial
+            // 
+            this.label_CheckModeSerial.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
+            this.label_CheckModeSerial.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label_CheckModeSerial.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(113)))), ((int)(((byte)(185)))));
+            this.label_CheckModeSerial.Location = new System.Drawing.Point(920, 53);
+            this.label_CheckModeSerial.Name = "label_CheckModeSerial";
+            this.label_CheckModeSerial.Size = new System.Drawing.Size(65, 15);
+            this.label_CheckModeSerial.TabIndex = 22;
+            this.label_CheckModeSerial.Text = "0";
+            this.label_CheckModeSerial.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+            // 
+            // label135
+            // 
+            this.label135.AutoSize = true;
+            this.label135.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label135.ForeColor = System.Drawing.SystemColors.ControlText;
+            this.label135.Location = new System.Drawing.Point(930, 32);
+            this.label135.Name = "label135";
+            this.label135.Size = new System.Drawing.Size(44, 17);
+            this.label135.TabIndex = 23;
+            this.label135.Text = "流水号";
+            this.label135.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+            this.label135.DoubleClick += new System.EventHandler(this.label135_DoubleClick);
+            // 
+            // mOS内阻校准系数ToolStripMenuItem
+            // 
+            this.mOS内阻校准系数ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
+            this.toolStripTextBox_MosCalK});
+            this.mOS内阻校准系数ToolStripMenuItem.Name = "mOS内阻校准系数ToolStripMenuItem";
+            this.mOS内阻校准系数ToolStripMenuItem.Size = new System.Drawing.Size(214, 26);
+            this.mOS内阻校准系数ToolStripMenuItem.Text = "MOS内阻校准系数";
+            // 
+            // toolStripTextBox_MosCalK
+            // 
+            this.toolStripTextBox_MosCalK.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.toolStripTextBox_MosCalK.Name = "toolStripTextBox_MosCalK";
+            this.toolStripTextBox_MosCalK.Size = new System.Drawing.Size(220, 28);
+            this.toolStripTextBox_MosCalK.Text = "1245,1393,1540,1704,1868";
+            this.toolStripTextBox_MosCalK.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ConfigFileSave_KeyDown);
+            // 
+            // mOS内阻范围ToolStripMenuItem
+            // 
+            this.mOS内阻范围ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
+            this.mOS1ToolStripMenuItem,
+            this.mOS2ToolStripMenuItem,
+            this.mOS3ToolStripMenuItem});
+            this.mOS内阻范围ToolStripMenuItem.Name = "mOS内阻范围ToolStripMenuItem";
+            this.mOS内阻范围ToolStripMenuItem.Size = new System.Drawing.Size(214, 26);
+            this.mOS内阻范围ToolStripMenuItem.Text = "MOS内阻范围";
+            // 
+            // mOS1ToolStripMenuItem
+            // 
+            this.mOS1ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
+            this.toolStripTextBox_MOS1});
+            this.mOS1ToolStripMenuItem.Name = "mOS1ToolStripMenuItem";
+            this.mOS1ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
+            this.mOS1ToolStripMenuItem.Text = "MOS1";
+            // 
+            // mOS2ToolStripMenuItem
+            // 
+            this.mOS2ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
+            this.toolStripTextBox_MOS2});
+            this.mOS2ToolStripMenuItem.Name = "mOS2ToolStripMenuItem";
+            this.mOS2ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
+            this.mOS2ToolStripMenuItem.Text = "MOS2";
+            // 
+            // mOS3ToolStripMenuItem
+            // 
+            this.mOS3ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
+            this.toolStripTextBox_MOS3});
+            this.mOS3ToolStripMenuItem.Name = "mOS3ToolStripMenuItem";
+            this.mOS3ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
+            this.mOS3ToolStripMenuItem.Text = "MOS3";
+            // 
+            // toolStripTextBox_MOS1
+            // 
+            this.toolStripTextBox_MOS1.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.toolStripTextBox_MOS1.Name = "toolStripTextBox_MOS1";
+            this.toolStripTextBox_MOS1.Size = new System.Drawing.Size(100, 28);
+            this.toolStripTextBox_MOS1.Text = "2500,3500";
+            this.toolStripTextBox_MOS1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ConfigFileSave_KeyDown);
+            // 
+            // toolStripTextBox_MOS2
             // 
-            this.checkBox_FacMode_MosCal.AutoSize = true;
-            this.checkBox_FacMode_MosCal.Checked = true;
-            this.checkBox_FacMode_MosCal.CheckState = System.Windows.Forms.CheckState.Checked;
-            this.checkBox_FacMode_MosCal.Enabled = false;
-            this.checkBox_FacMode_MosCal.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.checkBox_FacMode_MosCal.Location = new System.Drawing.Point(6, 106);
-            this.checkBox_FacMode_MosCal.Name = "checkBox_FacMode_MosCal";
-            this.checkBox_FacMode_MosCal.Size = new System.Drawing.Size(104, 21);
-            this.checkBox_FacMode_MosCal.TabIndex = 8;
-            this.checkBox_FacMode_MosCal.Text = "MOS内阻校准";
-            this.checkBox_FacMode_MosCal.UseVisualStyleBackColor = true;
+            this.toolStripTextBox_MOS2.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.toolStripTextBox_MOS2.Name = "toolStripTextBox_MOS2";
+            this.toolStripTextBox_MOS2.Size = new System.Drawing.Size(100, 28);
+            this.toolStripTextBox_MOS2.Text = "2500,3500";
+            this.toolStripTextBox_MOS2.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ConfigFileSave_KeyDown);
+            // 
+            // toolStripTextBox_MOS3
             // 
-            // label130
+            this.toolStripTextBox_MOS3.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.toolStripTextBox_MOS3.Name = "toolStripTextBox_MOS3";
+            this.toolStripTextBox_MOS3.Size = new System.Drawing.Size(100, 28);
+            this.toolStripTextBox_MOS3.Text = "2500,3500";
+            this.toolStripTextBox_MOS3.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ConfigFileSave_KeyDown);
             // 
-            this.label130.AutoSize = true;
-            this.label130.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label130.ForeColor = System.Drawing.SystemColors.ControlText;
-            this.label130.Location = new System.Drawing.Point(6, 216);
-            this.label130.Name = "label130";
-            this.label130.Size = new System.Drawing.Size(85, 17);
-            this.label130.TabIndex = 26;
-            this.label130.Text = "MOS内阻校准";
-            this.label130.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+            // toolStripSeparator2
             // 
-            // label_FacModeMosCal
+            this.toolStripSeparator2.Name = "toolStripSeparator2";
+            this.toolStripSeparator2.Size = new System.Drawing.Size(211, 6);
             // 
-            this.label_FacModeMosCal.BackColor = System.Drawing.Color.Red;
-            this.label_FacModeMosCal.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label_FacModeMosCal.ForeColor = System.Drawing.SystemColors.ControlText;
-            this.label_FacModeMosCal.Location = new System.Drawing.Point(95, 218);
-            this.label_FacModeMosCal.Name = "label_FacModeMosCal";
-            this.label_FacModeMosCal.Size = new System.Drawing.Size(12, 12);
-            this.label_FacModeMosCal.TabIndex = 27;
-            this.label_FacModeMosCal.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+            // toolStripSeparator3
             // 
-            // 协议类型ToolStripMenuItem1
-            // 
-            this.协议类型ToolStripMenuItem1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
-            this.cANToolStripMenuItem,
-            this.uARTToolStripMenuItem});
-            this.协议类型ToolStripMenuItem1.Name = "协议类型ToolStripMenuItem1";
-            this.协议类型ToolStripMenuItem1.Size = new System.Drawing.Size(192, 26);
-            this.协议类型ToolStripMenuItem1.Text = "协议类型";
+            this.toolStripSeparator3.Name = "toolStripSeparator3";
+            this.toolStripSeparator3.Size = new System.Drawing.Size(211, 6);
             // 
-            // cANToolStripMenuItem
+            // toolStripSeparator4
             // 
-            this.cANToolStripMenuItem.Checked = true;
-            this.cANToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked;
-            this.cANToolStripMenuItem.Name = "cANToolStripMenuItem";
-            this.cANToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
-            this.cANToolStripMenuItem.Text = "CAN";
-            this.cANToolStripMenuItem.Click += new System.EventHandler(this.cANToolStripMenuItem_Click);
+            this.toolStripSeparator4.Name = "toolStripSeparator4";
+            this.toolStripSeparator4.Size = new System.Drawing.Size(211, 6);
             // 
-            // uARTToolStripMenuItem
+            // toolStripSeparator5
             // 
-            this.uARTToolStripMenuItem.Name = "uARTToolStripMenuItem";
-            this.uARTToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
-            this.uARTToolStripMenuItem.Text = "UART";
-            this.uARTToolStripMenuItem.Click += new System.EventHandler(this.uARTToolStripMenuItem_Click);
+            this.toolStripSeparator5.Name = "toolStripSeparator5";
+            this.toolStripSeparator5.Size = new System.Drawing.Size(211, 6);
             // 
             // mainForm
             // 
@@ -7455,5 +7628,22 @@ namespace Welling_Motor_Debug_Tool
         private ToolStripMenuItem 协议类型ToolStripMenuItem1;
         private ToolStripMenuItem cANToolStripMenuItem;
         private ToolStripMenuItem uARTToolStripMenuItem;
+        private Label label_FacModeSerial;
+        private Label label131;
+        private Label label_CheckModeSerial;
+        private Label label135;
+        private ToolStripMenuItem mOS内阻校准系数ToolStripMenuItem;
+        private ToolStripTextBox toolStripTextBox_MosCalK;
+        private ToolStripSeparator toolStripSeparator2;
+        private ToolStripSeparator toolStripSeparator3;
+        private ToolStripSeparator toolStripSeparator4;
+        private ToolStripMenuItem mOS内阻范围ToolStripMenuItem;
+        private ToolStripMenuItem mOS1ToolStripMenuItem;
+        private ToolStripTextBox toolStripTextBox_MOS1;
+        private ToolStripMenuItem mOS2ToolStripMenuItem;
+        private ToolStripTextBox toolStripTextBox_MOS2;
+        private ToolStripMenuItem mOS3ToolStripMenuItem;
+        private ToolStripTextBox toolStripTextBox_MOS3;
+        private ToolStripSeparator toolStripSeparator5;
     }
 }

+ 317 - 55
Welling_Motor_Debug_Tool/mainForm.cs

@@ -23,7 +23,7 @@ namespace Welling_Motor_Debug_Tool
     {
         #region 变量定义
         //版本号
-        public static string Version = "2.1.9";
+        public static string Version = "2.2.0";
         //串口实例
         Serial_Process mySerialProcess = new Serial_Process();
         string PortNumSave = "";
@@ -261,7 +261,17 @@ namespace Welling_Motor_Debug_Tool
             if (!System.IO.File.Exists(localInfo.LocalPath + localInfo.NoteFileName))
             {
                 System.IO.File.WriteAllText(localInfo.LocalPath + localInfo.NoteFileName, "");
-            }            
+            }
+
+            //检验流水号记录文件
+            if (!System.IO.File.Exists(localInfo.LocalPath + localInfo.SerialNumFileName1))
+            {
+                System.IO.File.WriteAllText(localInfo.LocalPath + localInfo.SerialNumFileName1, "0");
+            }
+            if (!System.IO.File.Exists(localInfo.LocalPath + localInfo.SerialNumFileName2))
+            {
+                System.IO.File.WriteAllText(localInfo.LocalPath + localInfo.SerialNumFileName2, "0");
+            }
 
             //检查文件夹                        
             if (!Directory.Exists(localInfo.LocalPath))
@@ -351,7 +361,14 @@ namespace Welling_Motor_Debug_Tool
                     toolStripTextBox_ThT_PCB.Text = array_CfgInfo[39].ToString().Split(':')[1];
                     toolStripTextBox_ThT_MCU.Text = array_CfgInfo[40].ToString().Split(':')[1];
                     toolStripTextBox_ThT_Motor.Text = array_CfgInfo[41].ToString().Split(':')[1];
-
+                    //MOS内阻校准系数
+                    toolStripTextBox_MosCalK.Text = array_CfgInfo[44].ToString().Split(':')[1];
+                    toolStripTextBox_MOS1.Text= array_CfgInfo[45].ToString().Split(':')[1];
+                    toolStripTextBox_MOS2.Text = array_CfgInfo[46].ToString().Split(':')[1];
+                    toolStripTextBox_MOS3.Text = array_CfgInfo[47].ToString().Split(':')[1];
+                    //通信协议类型
+                    cANToolStripMenuItem.Checked = (array_CfgInfo[50].ToString().Split(':')[1] == "True");
+                    uARTToolStripMenuItem.Checked = !cANToolStripMenuItem.Checked;
                 }
                 catch (System.Exception)
                 {
@@ -367,6 +384,17 @@ namespace Welling_Motor_Debug_Tool
                 ConfigFileSave(false, localInfo.LocalPath + localInfo.ConfigFileName);
             }
 
+            //解析本地流水号记录
+            do
+            {
+                //测试模式
+                label_FacModeSerial.Text = File.ReadAllText(localInfo.LocalPath + localInfo.SerialNumFileName1);
+                //检验模式
+                label_CheckModeSerial.Text = File.ReadAllText(localInfo.LocalPath + localInfo.SerialNumFileName2);
+
+            } while (false);
+
+
             //获取本机信息,读取时间较长,优先从本地文件获取
             do
             {
@@ -426,6 +454,8 @@ namespace Welling_Motor_Debug_Tool
                             离线使用ToolStripMenuItem.Visible = false;
                             服务器配置ToolStripMenuItem.Visible = false;
                             判断阈值ToolStripMenuItem.Visible = false;
+                            mOS内阻校准系数ToolStripMenuItem.Visible = false;
+                            mOS内阻范围ToolStripMenuItem.Visible = false;
                             力矩传感器检验ToolStripMenuItem.Visible = false;
                             //显示生产信息
                             生产信息ToolStripMenuItem.Visible = true;
@@ -433,7 +463,8 @@ namespace Welling_Motor_Debug_Tool
                             电机类型ToolStripMenuItem.Visible = true;
                             中置电机ToolStripMenuItem.Enabled = false;
                             轮毂电机ToolStripMenuItem.Enabled = false;
-                            UART协议ToolStripMenuItem.Visible = false;
+                            if (uARTToolStripMenuItem.Checked)
+                                UART协议ToolStripMenuItem.Visible = true;
                             //隐藏研发调试界面
                             tabPage_MotorParam.Parent = null;
                             tabPage_BikeParam.Parent = null;
@@ -511,14 +542,16 @@ namespace Welling_Motor_Debug_Tool
                             服务器配置ToolStripMenuItem.Visible = false;
                             判断阈值ToolStripMenuItem.Visible = false;
                             力矩传感器检验ToolStripMenuItem.Visible = false;
+                            mOS内阻校准系数ToolStripMenuItem.Visible = false;
+                            mOS内阻范围ToolStripMenuItem.Visible = false;
                             //显示生产信息
                             生产信息ToolStripMenuItem.Visible = true;
-                            //显示电机类型,但不可编辑
-                            UART协议ToolStripMenuItem.Visible = true;
+                            //显示电机类型,但不可编辑                            
                             电机类型ToolStripMenuItem.Visible = true;
                             中置电机ToolStripMenuItem.Enabled = true;
                             轮毂电机ToolStripMenuItem.Enabled = true;
-
+                            if (uARTToolStripMenuItem.Checked)
+                                UART协议ToolStripMenuItem.Visible = true;
                             if (EnterForm1.comboBox_User.Text.Contains("中置"))
                             {
                                 中置电机ToolStripMenuItem.Checked = true;
@@ -546,14 +579,17 @@ namespace Welling_Motor_Debug_Tool
                             离线使用ToolStripMenuItem.Visible = false;
                             服务器配置ToolStripMenuItem.Visible = false;
                             判断阈值ToolStripMenuItem.Visible = false;
+                            mOS内阻校准系数ToolStripMenuItem.Visible = false;
+                            mOS内阻范围ToolStripMenuItem.Visible = false;
                             力矩传感器检验ToolStripMenuItem.Visible = false;
                             //显示生产信息
                             生产信息ToolStripMenuItem.Visible = true;
-                            //显示电机类型,但不可编辑
-                            UART协议ToolStripMenuItem.Visible = false;
+                            //显示电机类型,但不可编辑                            
                             电机类型ToolStripMenuItem.Visible = false;
                             中置电机ToolStripMenuItem.Enabled = false;
                             轮毂电机ToolStripMenuItem.Enabled = false;
+                            if (uARTToolStripMenuItem.Checked)
+                                UART协议ToolStripMenuItem.Visible = true;
                             //隐藏研发调试界面
                             tabPage_MotorParam.Parent = null;
                             tabPage_BikeParam.Parent = null;
@@ -598,9 +634,9 @@ namespace Welling_Motor_Debug_Tool
                             //隐藏量产界面
                             tabPage_ProductMode_Read.Parent = null;
                             tabPage_ProductMode_Write.Parent = null;
-                            判断阈值ToolStripMenuItem.Visible = false;
-                            力矩传感器检验ToolStripMenuItem.Visible = false;
                             服务器配置ToolStripMenuItem.Visible = false;
+                            if (uARTToolStripMenuItem.Checked)
+                                UART协议ToolStripMenuItem.Visible = true;
                             //退出登录
                             break;
                         }
@@ -794,16 +830,12 @@ namespace Welling_Motor_Debug_Tool
                     //检查是否有最新版本
                     string[] VerOld = mainForm.Version.Trim().Split('.');
                     string[] VerNew = arrText[0].ToString().Trim().Split('.');
-                    if (Convert.ToInt16(VerNew[0]) <= Convert.ToInt16(VerOld[0]))
+                    int VerOld_int = Convert.ToInt32(VerOld[0]) * 10000 + Convert.ToInt32(VerOld[1].PadLeft(2, '0')) * 100 + Convert.ToInt32(VerOld[2].PadLeft(2, '0'));
+                    int VerNew_int = Convert.ToInt32(VerNew[0]) * 10000 + Convert.ToInt32(VerNew[1].PadLeft(2, '0')) * 100 + Convert.ToInt32(VerNew[2].PadLeft(2, '0'));
+                    if (VerNew_int <= VerOld_int)
                     {
-                        if (Convert.ToInt16(VerNew[1]) <= Convert.ToInt16(VerOld[1]))
-                        {
-                            if (Convert.ToInt16(VerNew[2]) <= Convert.ToInt16(VerOld[2]))
-                            {
-                                //版本已是最新,跳出
-                                break;
-                            }
-                        }
+                        //版本已是最新,跳出
+                        break;
                     }
                     //确认下载最新版本
                     if (MessageBox.Show("是否更新新版本?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
@@ -2289,8 +2321,39 @@ namespace Welling_Motor_Debug_Tool
         /// <param name="e"></param>
         private void 写入存储ToolStripMenuItem_Click(object sender, EventArgs e)
         {
-            写入存储ToolStripMenuItem.Checked = !写入存储ToolStripMenuItem.Checked;
-            ConfigFileSave(true, localInfo.LocalPath + localInfo.ConfigFileName);
+            if (写入存储ToolStripMenuItem.Checked)
+            {
+                EnterForm1.ShowDialog();
+                try
+                {
+                    if (EnterForm1.textBox_Passwd.Text == EnterForm1.UserAccount[EnterForm1.comboBox_User.Text])//检验模式所有用户支持
+                    {
+                        if (EnterForm1.comboBox_User.Text == "工程参数配置")
+                        {
+                            写入存储ToolStripMenuItem.Checked = false;
+                            ConfigFileSave(true, localInfo.LocalPath + localInfo.ConfigFileName);
+                        }
+                        else
+                        {
+                            MessageBox.Show("权限不支持", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
+                        }
+                    }
+                    else
+                    {
+                        MessageBox.Show("密码错误", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
+                    }
+                }
+                catch (Exception)
+                {
+                    MessageBox.Show("用户不存在或密码错误", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
+                }
+            }
+            else
+            {
+                写入存储ToolStripMenuItem.Checked = true;
+                ConfigFileSave(true, localInfo.LocalPath + localInfo.ConfigFileName);
+            }            
+            
         }
 
         /// <summary>
@@ -5208,6 +5271,16 @@ namespace Welling_Motor_Debug_Tool
             CfgFileInfo += "T_PCB:" + toolStripTextBox_ThT_PCB.Text + "\r\n";
             CfgFileInfo += "T_MCU:" + toolStripTextBox_ThT_MCU.Text + "\r\n";
             CfgFileInfo += "T_Motor:" + toolStripTextBox_ThT_Motor.Text + "\r\n";
+            CfgFileInfo += "\r\n";
+            CfgFileInfo += "[MosCalK]" + "\r\n";
+            CfgFileInfo += "K1-K5:" + toolStripTextBox_MosCalK.Text + "\r\n";
+            CfgFileInfo += "MOS1:" + toolStripTextBox_MOS1.Text + "\r\n";
+            CfgFileInfo += "MOS2:" + toolStripTextBox_MOS2.Text + "\r\n";
+            CfgFileInfo += "MOS3:" + toolStripTextBox_MOS3.Text + "\r\n";
+            CfgFileInfo += "\r\n";
+            CfgFileInfo += "[ProtocolType]" + "\r\n";
+            CfgFileInfo += "CAN:" + cANToolStripMenuItem.Checked.ToString() + "\r\n";
+            CfgFileInfo += "UART:" + uARTToolStripMenuItem.Checked.ToString() + "\r\n";
 
             System.IO.File.WriteAllText(FileName, CfgFileInfo);
         }
@@ -5837,7 +5910,10 @@ namespace Welling_Motor_Debug_Tool
             }
 
             //流水号计数
-            //...
+            int serial = Convert.ToInt32(label_FacModeSerial.Text);
+            serial += 1;
+            label_FacModeSerial.Text = serial.ToString();
+            File.WriteAllText(localInfo.LocalPath + localInfo.SerialNumFileName1, serial.ToString());
 
             //创建线程,执行测试任务
             Thread th = new Thread(FacModeTest_Task);
@@ -6273,14 +6349,120 @@ namespace Welling_Motor_Debug_Tool
             //MOS内阻校准
             if (checkBox_FacMode_MosCal.Checked)
             {
+                label_FacModeStatus.Text = "MOS内阻校准";
+                richTextBox_FacModeLog.AppendText(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "->" + "开始MOS内阻校准" + "\r\n");
+                Delay_ms(500);
                 //提示进行负载切换
-
+                if (MessageBox.Show("电阻负载切换完成,开始校准?", "确认", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) != DialogResult.OK)
+                {
+                    richTextBox_FacModeLog.AppendText(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "->" + "取消MOS内阻校准" + "\r\n");
+                    label_FacModeStatus.Text = "存在故障!";
+                    label_FacModeResult.BackColor = Color.Red;
+                    label_FacModeResult.Text = "测试异常";
+                    Delay_ms(500);
+                    //存储异常并上传
+                    FacMode_Stop(false);
+                    return;
+                }
                 //确认后发送校准指令
-
-                //显示校准返回数据
-
+                richTextBox_FacModeLog.AppendText(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "->" + "发送校准指令" + "\r\n");
+                string[] K = toolStripTextBox_MosCalK.Text.Split(',');
+                Code[0] = (byte)((写入存储ToolStripMenuItem.Checked) ? 0x01 : 0x00);
+                ushort uwDataTemp = 0;
+                uwDataTemp = Convert.ToUInt16(K[0]);
+                Code[2] = (byte)(uwDataTemp & 0xFF);
+                Code[3] = (byte)(uwDataTemp >> 8);
+                uwDataTemp = Convert.ToUInt16(K[1]);
+                Code[4] = (byte)(uwDataTemp & 0xFF);
+                Code[5] = (byte)(uwDataTemp >> 8);
+                uwDataTemp = Convert.ToUInt16(K[2]);
+                Code[6] = (byte)(uwDataTemp & 0xFF);
+                Code[7] = (byte)(uwDataTemp >> 8);
+                uwDataTemp = Convert.ToUInt16(K[3]);
+                Code[8] = (byte)(uwDataTemp & 0xFF);
+                Code[9] = (byte)(uwDataTemp >> 8);
+                uwDataTemp = Convert.ToUInt16(K[4]);
+                Code[10] = (byte)(uwDataTemp & 0xFF);
+                Code[11] = (byte)(uwDataTemp >> 8);
+                mySerialProcess.SendCmd((ushort)0x751, (byte)0x16, (ushort)0x4A12, Code);
+                WriteACK = false;
+                WriteCnt = 0;
+                ACK_WaitCnt = 0;
+                while (ACK_WaitCnt <= 6) ; //3s
+                if (WriteACK == true)
+                {
+                    richTextBox_FacModeLog.AppendText(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "->" + "MOS内阻校准完成" + "\r\n");
+                }
+                else
+                {
+                    richTextBox_FacModeLog.AppendText(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "->" + "MOS内阻校准异常" + "\r\n");
+                    label_FacModeStatus.Text = "存在故障!";
+                    label_FacModeResult.BackColor = Color.Red;
+                    label_FacModeResult.Text = "测试异常";
+                    Delay_ms(500);
+                    //存储异常并上传
+                    FacMode_Stop(false);
+                    return;
+                }                
+                //因控制器复位需发送指令重新进入5S协议
+                if (uARTToolStripMenuItem.Checked)//UART控制器默认按照5S协议收发数据
+                {
+                    Code[0] = 0x00;//5S协议
+                    Code[1] = 0x00;
+                    mySerialProcess.SendCmd((ushort)0x7FF, (byte)0x16, (ushort)0x7702, Code);
+                    Delay_ms(500);
+                    mySerialProcess.SendCmd((ushort)0x7FF, (byte)0x16, (ushort)0x7702, Code);
+                    Delay_ms(500);
+                    richTextBox_FacModeLog.AppendText(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "->" + "发送指令进入5S协议" + "\r\n");
+                }
+                //读取显示校准返回数据
+                richTextBox_FacModeLog.AppendText(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "->" + "读取MOS内阻校准结果" + "\r\n");
+                foreach (Control c in groupBox21.Controls)
+                {
+                    if (c is TextBox)
+                        c.Text = "";
+                }
+                mySerialProcess.SendCmd((ushort)0x751, (byte)0x11, (ushort)0x4B00, null);
+                ACK_WaitCnt = 0;
+                while (ACK_WaitCnt <= 2) ; //1s
+                if ((textBox_MOS_R1.Text == string.Empty) || (textBox_MOS_R2.Text == string.Empty) || (textBox_MOS_R3.Text == string.Empty))
+                {
+                    richTextBox_FacModeLog.AppendText(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "->" + "读取MOS内阻校准结果异常" + "\r\n");
+                    label_FacModeStatus.Text = "存在故障!";
+                    label_FacModeResult.BackColor = Color.Red;
+                    label_FacModeResult.Text = "测试异常";
+                    Delay_ms(500);
+                    //存储异常并上传
+                    FacMode_Stop(false);
+                    return;
+                }
+                else
+                {
+                    richTextBox_FacModeLog.AppendText(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "->" + "MOS内阻:" + textBox_MOS_R1.Text + " " + textBox_MOS_R2.Text + " " + textBox_MOS_R3.Text + "\r\n");
+                }
                 //与校准返回数据对比
-
+                string[] MOS_R1_Th = toolStripTextBox_MOS1.Text.Split(',');
+                string[] MOS_R2_Th = toolStripTextBox_MOS2.Text.Split(',');
+                string[] MOS_R3_Th = toolStripTextBox_MOS3.Text.Split(',');
+                if ((Convert.ToUInt16(textBox_MOS_R1.Text) >= Convert.ToUInt16(MOS_R1_Th[0])) && (Convert.ToUInt16(textBox_MOS_R1.Text) <= Convert.ToUInt16(MOS_R1_Th[1])) &&
+                    (Convert.ToUInt16(textBox_MOS_R2.Text) >= Convert.ToUInt16(MOS_R2_Th[0])) && (Convert.ToUInt16(textBox_MOS_R2.Text) <= Convert.ToUInt16(MOS_R2_Th[1])) &&
+                    (Convert.ToUInt16(textBox_MOS_R3.Text) >= Convert.ToUInt16(MOS_R3_Th[0])) && (Convert.ToUInt16(textBox_MOS_R3.Text) <= Convert.ToUInt16(MOS_R3_Th[1]))
+                    )
+                {
+                    richTextBox_FacModeLog.AppendText(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "->" + "MOS内阻校准合格" + "\r\n");
+                    label_FacModeMosCal.BackColor = Color.Green;
+                }
+                else
+                {
+                    richTextBox_FacModeLog.AppendText(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "->" + "MOS内阻校准超范围" + "\r\n");
+                    label_FacModeStatus.Text = "存在故障!";
+                    label_FacModeResult.BackColor = Color.Red;
+                    label_FacModeResult.Text = "测试异常";
+                    Delay_ms(500);
+                    //存储异常并上传
+                    FacMode_Stop(false);
+                    return;
+                }
             }
             else
             {
@@ -6294,6 +6476,27 @@ namespace Welling_Motor_Debug_Tool
             if (checkBox_FacBaseFucTest.Checked)
             {
                 label_FacModeStatus.Text = "基础功能检测";
+                richTextBox_FacModeLog.AppendText(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "->" + "开始基础功能检测" + "\r\n");
+                //确认负载位置
+                if (checkBox_FacMode_MosCal.Checked)
+                {
+                    if (MessageBox.Show("请确认负载是否切换回电机?", "确认", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK)
+                    {
+                        if (MessageBox.Show("再次确认负载是否切换回电机?", "确认", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK)
+                            richTextBox_FacModeLog.AppendText(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "->" + "负载已切换为电机,继续测试" + "\r\n");
+                    }
+                    else
+                    {
+                        richTextBox_FacModeLog.AppendText(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "->" + "测试取消" + "\r\n");
+                        label_FacModeStatus.Text = "存在故障!";
+                        label_FacModeResult.BackColor = Color.Red;
+                        label_FacModeResult.Text = "测试异常";
+                        Delay_ms(500);
+                        //存储异常并上传
+                        FacMode_Stop(false);
+                        return;
+                    }
+                }                
                 //发送指令进入配置模式
                 do
                 {
@@ -6500,6 +6703,7 @@ namespace Welling_Motor_Debug_Tool
                     var Data = new byte[1];
                     Data[0] = (byte)0;
                     mySerialProcess.SendCmd((ushort)0x751, (byte)0x16, (ushort)0x2C01, Data);
+#if false //通过修改调试模式停止电机
                     //获取调试信息
                     string DebugDefaultInfo = "";
                     if (richTextBox_DebugParam.Text == string.Empty)
@@ -6531,6 +6735,30 @@ namespace Welling_Motor_Debug_Tool
                     mySerialProcess.SendCmd((ushort)0x751, (byte)0x16, (ushort)0x463C, Code);
                     label_FacModeStatus.Text = "停止电机";
                     richTextBox_FacModeLog.AppendText(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "->" + "停止电机" + "\r\n");
+
+#else //通过调整档位停止电机
+                    richTextBox_FacModeLog.AppendText(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "->" + "发送指令退出WALK" + "\r\n");
+                    Code[0] = 0x00;
+                    Code[1] = 0xF0;
+                    mySerialProcess.SendCmd((ushort)0x751, (byte)0x16, (ushort)0x2802, Code);
+                    WriteACK = false;
+                    WriteCnt = 0;
+                    ACK_WaitCnt = 0;
+                    while (ACK_WaitCnt <= 2) ; //1s
+                    if (textBox_RunInfo_GearSt.Text != "OFF")
+                    {
+                        richTextBox_FacModeLog.AppendText(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "->" + "退出WALK异常" + "\r\n");
+                        label_FacModeStatus.Text = "存在故障!";
+                        label_FacModeResult.BackColor = Color.Red;
+                        label_FacModeResult.Text = "测试异常";
+                        Delay_ms(500);
+                        //存储异常并上传
+                        FacMode_Stop(false);
+                        return;
+                    }
+                    richTextBox_FacModeLog.AppendText(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "->" + "已退出WALK,基础功能检测完成" + "\r\n");
+#endif
+
                     Delay_ms(2000);
                 } while (false);
             }
@@ -6601,7 +6829,7 @@ namespace Welling_Motor_Debug_Tool
                 }
                 if (ACK_WaitCnt >= 20)                
                 {
-                    richTextBox_FacModeLog.AppendText(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "->" + "力矩传感器异常" + "\r\n");
+                    richTextBox_FacModeLog.AppendText(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "->" + "力矩传感器异常" + " " + textBox_RunInfo_Torque.Text + "\r\n");
                     label_FacModeStatus.Text = "存在故障!";
                     label_FacModeResult.BackColor = Color.Red;
                     label_FacModeResult.Text = "测试异常";
@@ -6675,7 +6903,7 @@ namespace Welling_Motor_Debug_Tool
                 }
                 if (ACK_WaitCnt >= 20)
                 {
-                    richTextBox_FacModeLog.AppendText(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "->" + "踏频传感器异常" + "\r\n");
+                    richTextBox_FacModeLog.AppendText(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "->" + "踏频传感器异常" + " " + textBox_RunInfo_Cadence.Text + "\r\n");
                     label_FacModeStatus.Text = "存在故障!";
                     label_FacModeResult.BackColor = Color.Red;
                     label_FacModeResult.Text = "测试异常";
@@ -7268,7 +7496,10 @@ namespace Welling_Motor_Debug_Tool
             }
 
             //流水号计数
-            //...
+            int serial = Convert.ToInt32(label_CheckModeSerial.Text);
+            serial += 1;
+            label_CheckModeSerial.Text = serial.ToString();
+            File.WriteAllText(localInfo.LocalPath + localInfo.SerialNumFileName2, serial.ToString());
 
             //创建线程,执行测试任务
             Thread th = new Thread(CheckModeTest_Task);
@@ -7295,6 +7526,18 @@ namespace Welling_Motor_Debug_Tool
             Delay_ms(500);
             label_CheckModeStatus.Text = "系统开机";
 
+            //UART控制器发送复位指令把联动装置盒控制器接口波特率改为57600
+            if (uARTToolStripMenuItem.Checked)
+            {
+                Code[0] = (byte)'R';
+                Code[1] = (byte)'E';
+                Code[2] = (byte)'S';
+                Code[3] = (byte)'E';
+                Code[4] = (byte)'T';
+                mySerialProcess.SendCmd((ushort)0x751, (byte)0x16, (ushort)0x2505, Code);
+                Delay_ms(500);
+            }
+
             //系统开机,确保测试前先关机,发送关机指令再发送开机指令
             BootInfo = "";
             Code[0] = 0xF0;
@@ -7303,7 +7546,7 @@ namespace Welling_Motor_Debug_Tool
             Code[0] = 0xF1;
             mySerialProcess.SendCmd(0x7FF, 0x16, 0x2201, Code);
             ACK_WaitCnt = 0;
-            while (ACK_WaitCnt <= 6) ; //3s
+            while (ACK_WaitCnt <= 10) ; //5s            
 
             //检查BOOT版本
             if (BootInfo != string.Empty)
@@ -7324,6 +7567,17 @@ namespace Welling_Motor_Debug_Tool
                 return;
             }
 
+            if (uARTToolStripMenuItem.Checked)//UART控制器默认按照5S协议收发数据
+            {
+                Code[0] = 0x00;//5S协议
+                Code[1] = 0x00;
+                mySerialProcess.SendCmd((ushort)0x7FF, (byte)0x16, (ushort)0x7702, Code);
+                Delay_ms(500);
+                mySerialProcess.SendCmd((ushort)0x7FF, (byte)0x16, (ushort)0x7702, Code);
+                Delay_ms(500);
+                richTextBox_FacModeLog.AppendText(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "->" + "发送指令进入5S协议" + "\r\n");
+            }
+
             //发送指令读取版本信息
             do
             {
@@ -7773,29 +8027,7 @@ namespace Welling_Motor_Debug_Tool
 
         private void 力矩传感器检验ToolStripMenuItem_Click(object sender, EventArgs e)
         {
-            EnterForm1.ShowDialog();
-            try
-            {
-                if (EnterForm1.textBox_Passwd.Text == EnterForm1.UserAccount[EnterForm1.comboBox_User.Text])//检验模式所有用户支持
-                {
-                    if (EnterForm1.comboBox_User.Text == "工程参数配置")
-                    {
-                        TorqueParamsForm.ShowDialog();
-                    }
-                    else
-                    {
-                        MessageBox.Show("权限不支持", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
-                    }
-                }
-                else
-                {
-                    MessageBox.Show("密码错误", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
-                }
-            }
-            catch (Exception)
-            {
-                MessageBox.Show("用户不存在或密码错误", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
-            }
+            TorqueParamsForm.ShowDialog();            
         }
 
         private void textBox_CheckModeScan_KeyUp(object sender, KeyEventArgs e)
@@ -8584,6 +8816,7 @@ namespace Welling_Motor_Debug_Tool
             cANToolStripMenuItem.Checked= true;
             uARTToolStripMenuItem.Checked = false;
             UART协议ToolStripMenuItem.Visible = false;
+            ConfigFileSave(true, localInfo.LocalPath + localInfo.ConfigFileName);
         }
 
         /// <summary>
@@ -8596,6 +8829,35 @@ namespace Welling_Motor_Debug_Tool
             cANToolStripMenuItem.Checked = false;
             uARTToolStripMenuItem.Checked = true;
             UART协议ToolStripMenuItem.Visible = true;
+            ConfigFileSave(true, localInfo.LocalPath + localInfo.ConfigFileName);
+        }
+
+        /// <summary>
+        /// 清除流水号
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void label131_DoubleClick(object sender, EventArgs e)
+        {
+            if (MessageBox.Show("确认清零流水号?", "确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
+            {
+                label_FacModeSerial.Text = "0";
+                File.WriteAllText(localInfo.LocalPath + localInfo.SerialNumFileName1, label_FacModeSerial.Text);
+            }
+        }
+
+        /// <summary>
+        /// 清除流水号
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void label135_DoubleClick(object sender, EventArgs e)
+        {
+            if (MessageBox.Show("确认清零流水号?", "确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
+            {
+                label_CheckModeSerial.Text = "0";
+                File.WriteAllText(localInfo.LocalPath + localInfo.SerialNumFileName2, label_CheckModeSerial.Text);
+            }
         }
     }
 }

BIN
Welling_Motor_Debug_Tool/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache


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


+ 1 - 1
Welling_Motor_Debug_Tool/obj/Debug/Welling_Motor_Debug_Tool.csproj.CoreCompileInputs.cache

@@ -1 +1 @@
-de075b059cc2fb100d69e5bca5dc0683faf30372
+7d07050510310e55bf8550d9eca9cee89d28efbe0ae4d90d40193d6cce53ea30

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