Forráskód Böngészése

1,增加整车信息2和用户骑行参数的读取和写入;
2,历史信息原ODO信号变更为车架ODO,预留位增加系统ODO;
3,不识别联动装置盒时直接打开测试界面;
4,增加产品标签的读取和写入;
5,与仪表的用户参数增加限速微调。

Dail 1 éve
szülő
commit
fe684a2a50

BIN
.vs/Welling_Motor_Debug_Tool/v17/.suo


+ 6 - 6
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", "前后灯参数","轮胎周长微调","启动模式","开关机参数",
-                                                           "预留1"};
+                                                           "转把限速结束值"};
         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> {"位置传感器零点","位置传感器当前零点","峰值电流","电流保护阈值","最高档电压保护阈值","最高档欠压保护阈值",
@@ -27,7 +27,7 @@ namespace Welling_Motor_Debug_Tool
                                                              "车速限幅启动阈值", "车速限幅停止阈值" ,"踏频占比", "踏频助力Kp","踏频助力加速限制","踏频助力退饱和步进","踏频助力电流步进",
                                                              "预留1","预留2","预留3","预留4"};
         public List<string> UsrRideParam = new List<string> { "ECO助力比增益","ECO加速度增益", "NORM助力比增益", "NORM加速度增益", "SPORT助力比增益", "SPORT加速度增益", "TURBO助力比增益", "TURBO加速度增益", "SMART助力比增益", "SMART加速度增益",
-                                                              "ECO最大电流增益","ECO最大力矩增益","NORM最大电流增益","NORM最大力矩增益","SPORT最大电流增益","SPORT最大力矩增益","TURBO最大电流增益","TURBO最大力矩增益","TURBO最大电流增益","TURBO最大力矩增益"};
+                                                              "ECO最大电流增益","ECO最大力矩增益","NORM最大电流增益","NORM最大力矩增益","SPORT最大电流增益","SPORT最大力矩增益","TURBO最大电流增益","TURBO最大力矩增益","SMART最大电流增益","SMART最大力矩增益","预留1","预留2","预留3","预留4","预留5","预留6"};
         public List<string> DebugParam = new List<string> { "整体运行模式","位置获取模式","采样模式","旋转方向","定位电流","拖拽电压",
                                                             "拖拽电流","拖拽频率","加速斜率","减速斜率","转速环控制器带宽","转速环控制器m",
                                                             "电流环控制器带宽","电流环控制器m","磁链观测器带宽","磁链观测器m",
@@ -35,11 +35,11 @@ namespace Welling_Motor_Debug_Tool
                                                             "功率限幅值","功率Error","功率限幅Kp","功率限幅Ki",
                                                             "预留1","预留2","预留3","预留4"};
         public List<string> Record = new List<string> { "开机次数", "使用时间 H", "使用时间 L", "NTC 温度传感器最高温", "NTC 温度传感器最低温",
-                                                        "硬件过流保护次数", "软件过流保护次数", "过温保护次数", "堵转次数", "缺相次数", "过压次数", 
+                                                        "硬件过流保护次数", "软件过流保护次数", "过温保护次数", "堵转次数", "缺相次数", "过压次数",
                                                         "欠压次数", "通讯超时次数", "平均功耗 1", "平均功耗 2", "平均功耗 3", "平均功耗 4", "平均功耗 5",
-                                                        "ODO 里程 H", "ODO 里程 L", "ODO 时间 H", "ODO 时间 L", "TRIP 里程 H", "TRIP 里程 L", 
-                                                        "TRIP 时间 H", "TRIP 时间 L", "力矩传感器故障次数", "踏频传感器故障次数", "车速传感器故障次数", 
-                                                        "位置传感器故障次数" };
+                                                        "车架ODO 里程 H", "车架ODO 里程 L", "车架ODO 时间 H", "车架ODO 时间 L", "TRIP 里程 H", "TRIP 里程 L",
+                                                        "TRIP 时间 H", "TRIP 时间 L", "力矩传感器故障次数", "踏频传感器故障次数", "车速传感器故障次数",
+                                                        "位置传感器故障次数", "ODO 里程 H", "ODO 里程 L", "ODO 时间 H", "ODO 时间 L" };
         public List<string> SensorParam = new List<string> { "力矩传感器出厂零点值", "力矩传感器历史零点值 1", "力矩传感器历史零点值 2", 
                                                              "力矩传感器历史零点值 3", "力矩传感器最新零点值", "力矩传感器最大转矩", 
                                                              "第一阶段转矩点加载值", "第一阶段转矩点采集值", "第二阶段转矩点加载值", 

+ 9 - 3
Welling_Motor_Debug_Tool/Version.cs

@@ -15,18 +15,24 @@ namespace Welling_Motor_Debug_Tool
     public partial class Version : Form
     {
         //修改记录
-        string ChangeLog = "修改记录:\r\n" + "V2.1.6\r\n" +
+        string ChangeLog = "修改记录:\r\n" + 
+            "V2.1.6\r\n" +
             "1,修改控制器内阻校准指令,增加写入存储标志;\r\n" +
             "2,参数生成界面增加导入样机测试记录的文件功能;\r\n" +
             "3,参数生成界面增加锁,防止误触。\r\n\r\n" +
-            mainForm.Version + "\r\n" +
+            "V2.1.7\r\n" +
             "1,解决系统显示缩放后,截图显示不完全的问题;\r\n" +
             "2,允许离线使用是关闭网络定时检测;\r\n" +
             "3,定时检测网络断开时不自动关闭,此时不允许使用,等待网络恢复;\r\n" +
             "4,启动登录密码错误时不自动关闭,重新进入登录;\r\n" +
             "5,部分提示框修改为自动关闭;\r\n" +
             "6,增加读取本机信息功能;\r\n" +
-            "7,启动时自动上传登录日志,包含本机信息。\r\n"
+            "7,启动时自动上传登录日志,包含本机信息。\r\n\r\n" +
+            "V2.1.8\r\n" +
+            "1,限制FCT治具测试账户需要联网使用;\r\n" +
+            "2,量产测试和检验模式下,双击配置文件可删除选中的配置文件。\r\n\r\n" +
+            "V" + mainForm.Version + "\r\n" +
+            "\r\n"
             ;
 
         //存储路径文件

+ 365 - 250
Welling_Motor_Debug_Tool/mainForm.Designer.cs

@@ -152,6 +152,10 @@ namespace Welling_Motor_Debug_Tool
             this.button_WriteBikeParam = new System.Windows.Forms.Button();
             this.button_ReadBikeParam = new System.Windows.Forms.Button();
             this.richTextBox_BikeParam = new System.Windows.Forms.RichTextBox();
+            this.tabPage_BikeParam2 = new System.Windows.Forms.TabPage();
+            this.button_WriteBikeParam2 = new System.Windows.Forms.Button();
+            this.button_ReadBikeParam2 = new System.Windows.Forms.Button();
+            this.richTextBox_BikeParam2 = new System.Windows.Forms.RichTextBox();
             this.tabPage_ControlParam = new System.Windows.Forms.TabPage();
             this.button_WriteControlParam = new System.Windows.Forms.Button();
             this.button_ReadControlParam = new System.Windows.Forms.Button();
@@ -176,6 +180,10 @@ namespace Welling_Motor_Debug_Tool
             this.button_WriteAssistParam = new System.Windows.Forms.Button();
             this.button_ReadAssistParam = new System.Windows.Forms.Button();
             this.richTextBox_AssistParam = new System.Windows.Forms.RichTextBox();
+            this.tabPage_UsrRideParam = new System.Windows.Forms.TabPage();
+            this.button_WriteUsrRidetParam = new System.Windows.Forms.Button();
+            this.button_ReadUsrRideParam = new System.Windows.Forms.Button();
+            this.richTextBox_UsrRidesParam = new System.Windows.Forms.RichTextBox();
             this.tabPage_DebugParam = new System.Windows.Forms.TabPage();
             this.button_WriteDebugParam = new System.Windows.Forms.Button();
             this.button_ReadDebugParam = new System.Windows.Forms.Button();
@@ -201,6 +209,10 @@ namespace Welling_Motor_Debug_Tool
             this.button_ReadSaveFlag = new System.Windows.Forms.Button();
             this.button_WriteSaveFlag = new System.Windows.Forms.Button();
             this.checkBox_SaveYes = new System.Windows.Forms.CheckBox();
+            this.groupBox23 = new System.Windows.Forms.GroupBox();
+            this.button_ReadTag = new System.Windows.Forms.Button();
+            this.button_WriteTag = new System.Windows.Forms.Button();
+            this.textBox_TagInfo = new System.Windows.Forms.TextBox();
             this.groupBox9 = new System.Windows.Forms.GroupBox();
             this.button_Recovery = new System.Windows.Forms.Button();
             this.button_ClearLog = new System.Windows.Forms.Button();
@@ -382,6 +394,15 @@ namespace Welling_Motor_Debug_Tool
             this.textBox_FacModeSensorCal3 = new System.Windows.Forms.TextBox();
             this.textBox_FacModeSensorCal1 = new System.Windows.Forms.TextBox();
             this.textBox_FacModeSensorCal2 = new System.Windows.Forms.TextBox();
+            this.groupBox24 = new System.Windows.Forms.GroupBox();
+            this.button_ReadRideLog = new System.Windows.Forms.Button();
+            this.button_WriteRideLog = new System.Windows.Forms.Button();
+            this.textBox_TRIP_KM = new System.Windows.Forms.TextBox();
+            this.textBox_TRIP_TIME = new System.Windows.Forms.TextBox();
+            this.textBox_ODO_KM = new System.Windows.Forms.TextBox();
+            this.textBox_ODO_TIME = new System.Windows.Forms.TextBox();
+            this.label126 = new System.Windows.Forms.Label();
+            this.label119 = new System.Windows.Forms.Label();
             this.groupBox19 = new System.Windows.Forms.GroupBox();
             this.button_FacModeInit = new System.Windows.Forms.Button();
             this.tabPage_ProductMode_Write = new System.Windows.Forms.TabPage();
@@ -559,27 +580,15 @@ 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.groupBox23 = new System.Windows.Forms.GroupBox();
-            this.textBox_TagInfo = new System.Windows.Forms.TextBox();
-            this.button_WriteTag = new System.Windows.Forms.Button();
-            this.button_ReadTag = new System.Windows.Forms.Button();
-            this.groupBox24 = new System.Windows.Forms.GroupBox();
-            this.textBox_ODO_KM = new System.Windows.Forms.TextBox();
-            this.textBox_ODO_TIME = new System.Windows.Forms.TextBox();
-            this.textBox_TRIP_TIME = new System.Windows.Forms.TextBox();
-            this.textBox_TRIP_KM = new System.Windows.Forms.TextBox();
-            this.label119 = new System.Windows.Forms.Label();
-            this.label126 = new System.Windows.Forms.Label();
-            this.button_ReadRideLog = new System.Windows.Forms.Button();
-            this.button_WriteRideLog = new System.Windows.Forms.Button();
-            this.tabPage_BikeParam2 = new System.Windows.Forms.TabPage();
-            this.tabPage_UsrRideParam = new System.Windows.Forms.TabPage();
-            this.button_WriteBikeParam2 = new System.Windows.Forms.Button();
-            this.button_ReadBikeParam2 = new System.Windows.Forms.Button();
-            this.richTextBox_BikeParam2 = new System.Windows.Forms.RichTextBox();
-            this.button_WriteUsrRidetParam = new System.Windows.Forms.Button();
-            this.button_ReadUsrRideParam = new System.Windows.Forms.Button();
-            this.richTextBox_UsrRidesParam = new System.Windows.Forms.RichTextBox();
+            this.numericUpDown_OBC_SpeedLimitAdj = new System.Windows.Forms.NumericUpDown();
+            this.label80 = new System.Windows.Forms.Label();
+            this.label128 = new System.Windows.Forms.Label();
+            this.checkBox_UserRideParam_OBC = new System.Windows.Forms.CheckBox();
+            this.删除远程文件ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+            this.生产配置文件ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+            this.样机测试记录ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+            this.toolStripTextBox_DelCfgFile = new System.Windows.Forms.ToolStripTextBox();
+            this.toolStripTextBox_DelLogFile = new System.Windows.Forms.ToolStripTextBox();
             this.menuStrip_Set.SuspendLayout();
             this.statusStrip1.SuspendLayout();
             this.groupBox1.SuspendLayout();
@@ -588,15 +597,18 @@ namespace Welling_Motor_Debug_Tool
             this.tabControl1.SuspendLayout();
             this.tabPage_MotorParam.SuspendLayout();
             this.tabPage_BikeParam.SuspendLayout();
+            this.tabPage_BikeParam2.SuspendLayout();
             this.tabPage_ControlParam.SuspendLayout();
             this.tabPage_SensorParam.SuspendLayout();
             this.tabPage_AssistParam.SuspendLayout();
+            this.tabPage_UsrRideParam.SuspendLayout();
             this.tabPage_DebugParam.SuspendLayout();
             this.tabPage_RecordInfo.SuspendLayout();
             this.tabPage_OtherInfo.SuspendLayout();
             this.groupBox16.SuspendLayout();
             this.groupBox18.SuspendLayout();
             this.groupBox17.SuspendLayout();
+            this.groupBox23.SuspendLayout();
             this.groupBox9.SuspendLayout();
             this.groupBox8.SuspendLayout();
             this.groupBox7.SuspendLayout();
@@ -620,6 +632,7 @@ namespace Welling_Motor_Debug_Tool
             ((System.ComponentModel.ISupportInitialize)(this.trackBar_FacModeMotorSpeedAdj)).BeginInit();
             this.groupBox21.SuspendLayout();
             this.groupBox20.SuspendLayout();
+            this.groupBox24.SuspendLayout();
             this.groupBox19.SuspendLayout();
             this.tabPage_ProductMode_Write.SuspendLayout();
             this.groupBox28.SuspendLayout();
@@ -635,10 +648,7 @@ namespace Welling_Motor_Debug_Tool
             this.tabPage_RunInfo.SuspendLayout();
             this.tabPage_DebugInfo.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
-            this.groupBox23.SuspendLayout();
-            this.groupBox24.SuspendLayout();
-            this.tabPage_BikeParam2.SuspendLayout();
-            this.tabPage_UsrRideParam.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.numericUpDown_OBC_SpeedLimitAdj)).BeginInit();
             this.SuspendLayout();
             // 
             // menuStrip_Set
@@ -1230,7 +1240,8 @@ namespace Welling_Motor_Debug_Tool
             this.计算器ToolStripMenuItem,
             this.页面保存ToolStripMenuItem,
             this.屏幕键盘ToolStripMenuItem,
-            this.指令调试ToolStripMenuItem});
+            this.指令调试ToolStripMenuItem,
+            this.删除远程文件ToolStripMenuItem});
             this.工具箱ToolStripMenuItem.ForeColor = System.Drawing.Color.White;
             this.工具箱ToolStripMenuItem.Name = "工具箱ToolStripMenuItem";
             this.工具箱ToolStripMenuItem.Size = new System.Drawing.Size(70, 25);
@@ -1799,6 +1810,49 @@ namespace Welling_Motor_Debug_Tool
             this.richTextBox_BikeParam.TabIndex = 2;
             this.richTextBox_BikeParam.Text = "";
             // 
+            // tabPage_BikeParam2
+            // 
+            this.tabPage_BikeParam2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
+            this.tabPage_BikeParam2.Controls.Add(this.button_WriteBikeParam2);
+            this.tabPage_BikeParam2.Controls.Add(this.button_ReadBikeParam2);
+            this.tabPage_BikeParam2.Controls.Add(this.richTextBox_BikeParam2);
+            this.tabPage_BikeParam2.Location = new System.Drawing.Point(4, 30);
+            this.tabPage_BikeParam2.Name = "tabPage_BikeParam2";
+            this.tabPage_BikeParam2.Size = new System.Drawing.Size(990, 315);
+            this.tabPage_BikeParam2.TabIndex = 13;
+            this.tabPage_BikeParam2.Text = "整车信息2";
+            // 
+            // button_WriteBikeParam2
+            // 
+            this.button_WriteBikeParam2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
+            this.button_WriteBikeParam2.Location = new System.Drawing.Point(858, 259);
+            this.button_WriteBikeParam2.Name = "button_WriteBikeParam2";
+            this.button_WriteBikeParam2.Size = new System.Drawing.Size(126, 50);
+            this.button_WriteBikeParam2.TabIndex = 7;
+            this.button_WriteBikeParam2.Text = "写入参数";
+            this.button_WriteBikeParam2.UseVisualStyleBackColor = false;
+            this.button_WriteBikeParam2.Click += new System.EventHandler(this.button_WriteBikeParam2_Click);
+            // 
+            // button_ReadBikeParam2
+            // 
+            this.button_ReadBikeParam2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
+            this.button_ReadBikeParam2.Location = new System.Drawing.Point(858, 203);
+            this.button_ReadBikeParam2.Name = "button_ReadBikeParam2";
+            this.button_ReadBikeParam2.Size = new System.Drawing.Size(126, 50);
+            this.button_ReadBikeParam2.TabIndex = 6;
+            this.button_ReadBikeParam2.Text = "读取参数";
+            this.button_ReadBikeParam2.UseVisualStyleBackColor = false;
+            this.button_ReadBikeParam2.Click += new System.EventHandler(this.button_ReadBikeParam2_Click);
+            // 
+            // richTextBox_BikeParam2
+            // 
+            this.richTextBox_BikeParam2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
+            this.richTextBox_BikeParam2.Location = new System.Drawing.Point(6, 6);
+            this.richTextBox_BikeParam2.Name = "richTextBox_BikeParam2";
+            this.richTextBox_BikeParam2.Size = new System.Drawing.Size(846, 303);
+            this.richTextBox_BikeParam2.TabIndex = 5;
+            this.richTextBox_BikeParam2.Text = "";
+            // 
             // tabPage_ControlParam
             // 
             this.tabPage_ControlParam.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
@@ -2083,6 +2137,50 @@ namespace Welling_Motor_Debug_Tool
             this.richTextBox_AssistParam.TabIndex = 2;
             this.richTextBox_AssistParam.Text = "";
             // 
+            // tabPage_UsrRideParam
+            // 
+            this.tabPage_UsrRideParam.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
+            this.tabPage_UsrRideParam.Controls.Add(this.checkBox_UserRideParam_OBC);
+            this.tabPage_UsrRideParam.Controls.Add(this.button_WriteUsrRidetParam);
+            this.tabPage_UsrRideParam.Controls.Add(this.button_ReadUsrRideParam);
+            this.tabPage_UsrRideParam.Controls.Add(this.richTextBox_UsrRidesParam);
+            this.tabPage_UsrRideParam.Location = new System.Drawing.Point(4, 30);
+            this.tabPage_UsrRideParam.Name = "tabPage_UsrRideParam";
+            this.tabPage_UsrRideParam.Size = new System.Drawing.Size(990, 315);
+            this.tabPage_UsrRideParam.TabIndex = 14;
+            this.tabPage_UsrRideParam.Text = "用户骑行参数";
+            // 
+            // button_WriteUsrRidetParam
+            // 
+            this.button_WriteUsrRidetParam.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
+            this.button_WriteUsrRidetParam.Location = new System.Drawing.Point(858, 259);
+            this.button_WriteUsrRidetParam.Name = "button_WriteUsrRidetParam";
+            this.button_WriteUsrRidetParam.Size = new System.Drawing.Size(126, 50);
+            this.button_WriteUsrRidetParam.TabIndex = 7;
+            this.button_WriteUsrRidetParam.Text = "写入参数";
+            this.button_WriteUsrRidetParam.UseVisualStyleBackColor = false;
+            this.button_WriteUsrRidetParam.Click += new System.EventHandler(this.button_WriteUsrRidetParam_Click);
+            // 
+            // button_ReadUsrRideParam
+            // 
+            this.button_ReadUsrRideParam.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
+            this.button_ReadUsrRideParam.Location = new System.Drawing.Point(858, 203);
+            this.button_ReadUsrRideParam.Name = "button_ReadUsrRideParam";
+            this.button_ReadUsrRideParam.Size = new System.Drawing.Size(126, 50);
+            this.button_ReadUsrRideParam.TabIndex = 6;
+            this.button_ReadUsrRideParam.Text = "读取参数";
+            this.button_ReadUsrRideParam.UseVisualStyleBackColor = false;
+            this.button_ReadUsrRideParam.Click += new System.EventHandler(this.button_ReadUsrRideParam_Click);
+            // 
+            // richTextBox_UsrRidesParam
+            // 
+            this.richTextBox_UsrRidesParam.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
+            this.richTextBox_UsrRidesParam.Location = new System.Drawing.Point(6, 6);
+            this.richTextBox_UsrRidesParam.Name = "richTextBox_UsrRidesParam";
+            this.richTextBox_UsrRidesParam.Size = new System.Drawing.Size(846, 303);
+            this.richTextBox_UsrRidesParam.TabIndex = 5;
+            this.richTextBox_UsrRidesParam.Text = "";
+            // 
             // tabPage_DebugParam
             // 
             this.tabPage_DebugParam.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
@@ -2274,9 +2372,9 @@ namespace Welling_Motor_Debug_Tool
             // 
             this.groupBox18.Controls.Add(this.radioButton_SIP_SaveNo);
             this.groupBox18.Controls.Add(this.radioButton_SIP_SaveYes);
-            this.groupBox18.Location = new System.Drawing.Point(107, 30);
+            this.groupBox18.Location = new System.Drawing.Point(132, 29);
             this.groupBox18.Name = "groupBox18";
-            this.groupBox18.Size = new System.Drawing.Size(95, 91);
+            this.groupBox18.Size = new System.Drawing.Size(120, 91);
             this.groupBox18.TabIndex = 11;
             this.groupBox18.TabStop = false;
             this.groupBox18.Text = "SIP校准";
@@ -2309,7 +2407,7 @@ namespace Welling_Motor_Debug_Tool
             this.groupBox17.Controls.Add(this.radioButton_EE_SaveNo);
             this.groupBox17.Location = new System.Drawing.Point(6, 29);
             this.groupBox17.Name = "groupBox17";
-            this.groupBox17.Size = new System.Drawing.Size(95, 92);
+            this.groupBox17.Size = new System.Drawing.Size(120, 92);
             this.groupBox17.TabIndex = 10;
             this.groupBox17.TabStop = false;
             this.groupBox17.Text = "EEPROM";
@@ -2339,7 +2437,7 @@ namespace Welling_Motor_Debug_Tool
             // button_ReadSaveFlag
             // 
             this.button_ReadSaveFlag.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
-            this.button_ReadSaveFlag.Location = new System.Drawing.Point(207, 59);
+            this.button_ReadSaveFlag.Location = new System.Drawing.Point(266, 53);
             this.button_ReadSaveFlag.Name = "button_ReadSaveFlag";
             this.button_ReadSaveFlag.Size = new System.Drawing.Size(61, 29);
             this.button_ReadSaveFlag.TabIndex = 3;
@@ -2349,8 +2447,8 @@ namespace Welling_Motor_Debug_Tool
             // 
             // button_WriteSaveFlag
             // 
-            this.button_WriteSaveFlag.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(128)))), ((int)(((byte)(255)))));
-            this.button_WriteSaveFlag.Location = new System.Drawing.Point(268, 59);
+            this.button_WriteSaveFlag.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
+            this.button_WriteSaveFlag.Location = new System.Drawing.Point(266, 89);
             this.button_WriteSaveFlag.Name = "button_WriteSaveFlag";
             this.button_WriteSaveFlag.Size = new System.Drawing.Size(61, 29);
             this.button_WriteSaveFlag.TabIndex = 4;
@@ -2361,13 +2459,55 @@ namespace Welling_Motor_Debug_Tool
             // checkBox_SaveYes
             // 
             this.checkBox_SaveYes.AutoSize = true;
-            this.checkBox_SaveYes.Location = new System.Drawing.Point(207, 28);
+            this.checkBox_SaveYes.Location = new System.Drawing.Point(266, 23);
             this.checkBox_SaveYes.Name = "checkBox_SaveYes";
             this.checkBox_SaveYes.Size = new System.Drawing.Size(61, 25);
             this.checkBox_SaveYes.TabIndex = 5;
             this.checkBox_SaveYes.Text = "保存";
             this.checkBox_SaveYes.UseVisualStyleBackColor = true;
             // 
+            // groupBox23
+            // 
+            this.groupBox23.Controls.Add(this.button_ReadTag);
+            this.groupBox23.Controls.Add(this.button_WriteTag);
+            this.groupBox23.Controls.Add(this.textBox_TagInfo);
+            this.groupBox23.Location = new System.Drawing.Point(602, 72);
+            this.groupBox23.Name = "groupBox23";
+            this.groupBox23.Size = new System.Drawing.Size(381, 107);
+            this.groupBox23.TabIndex = 4;
+            this.groupBox23.TabStop = false;
+            this.groupBox23.Text = "产品标签";
+            // 
+            // button_ReadTag
+            // 
+            this.button_ReadTag.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
+            this.button_ReadTag.Location = new System.Drawing.Point(268, 67);
+            this.button_ReadTag.Name = "button_ReadTag";
+            this.button_ReadTag.Size = new System.Drawing.Size(50, 29);
+            this.button_ReadTag.TabIndex = 2;
+            this.button_ReadTag.Text = "查询";
+            this.button_ReadTag.UseVisualStyleBackColor = false;
+            this.button_ReadTag.Click += new System.EventHandler(this.button_ReadTag_Click);
+            // 
+            // button_WriteTag
+            // 
+            this.button_WriteTag.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
+            this.button_WriteTag.Location = new System.Drawing.Point(323, 67);
+            this.button_WriteTag.Name = "button_WriteTag";
+            this.button_WriteTag.Size = new System.Drawing.Size(50, 29);
+            this.button_WriteTag.TabIndex = 2;
+            this.button_WriteTag.Text = "写入";
+            this.button_WriteTag.UseVisualStyleBackColor = false;
+            this.button_WriteTag.Click += new System.EventHandler(this.button_WriteTag_Click);
+            // 
+            // textBox_TagInfo
+            // 
+            this.textBox_TagInfo.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
+            this.textBox_TagInfo.Location = new System.Drawing.Point(9, 35);
+            this.textBox_TagInfo.Name = "textBox_TagInfo";
+            this.textBox_TagInfo.Size = new System.Drawing.Size(364, 28);
+            this.textBox_TagInfo.TabIndex = 1;
+            // 
             // groupBox9
             // 
             this.groupBox9.Controls.Add(this.button_Recovery);
@@ -2385,6 +2525,7 @@ namespace Welling_Motor_Debug_Tool
             // 
             this.button_Recovery.BackColor = System.Drawing.Color.HotPink;
             this.button_Recovery.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F);
+            this.button_Recovery.ForeColor = System.Drawing.Color.White;
             this.button_Recovery.Location = new System.Drawing.Point(100, 25);
             this.button_Recovery.Name = "button_Recovery";
             this.button_Recovery.Size = new System.Drawing.Size(85, 35);
@@ -2397,6 +2538,7 @@ namespace Welling_Motor_Debug_Tool
             // 
             this.button_ClearLog.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(192)))), ((int)(((byte)(128)))));
             this.button_ClearLog.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F);
+            this.button_ClearLog.ForeColor = System.Drawing.Color.White;
             this.button_ClearLog.Location = new System.Drawing.Point(288, 24);
             this.button_ClearLog.Name = "button_ClearLog";
             this.button_ClearLog.Size = new System.Drawing.Size(85, 35);
@@ -2409,6 +2551,7 @@ namespace Welling_Motor_Debug_Tool
             // 
             this.button_Reset.BackColor = System.Drawing.Color.MediumSeaGreen;
             this.button_Reset.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F);
+            this.button_Reset.ForeColor = System.Drawing.Color.White;
             this.button_Reset.Location = new System.Drawing.Point(194, 25);
             this.button_Reset.Name = "button_Reset";
             this.button_Reset.Size = new System.Drawing.Size(85, 35);
@@ -2421,6 +2564,7 @@ namespace Welling_Motor_Debug_Tool
             // 
             this.button_SystemClear.BackColor = System.Drawing.Color.Tomato;
             this.button_SystemClear.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F);
+            this.button_SystemClear.ForeColor = System.Drawing.Color.White;
             this.button_SystemClear.Location = new System.Drawing.Point(6, 25);
             this.button_SystemClear.Name = "button_SystemClear";
             this.button_SystemClear.Size = new System.Drawing.Size(85, 35);
@@ -3225,6 +3369,9 @@ namespace Welling_Motor_Debug_Tool
             // 
             // groupBox13
             // 
+            this.groupBox13.Controls.Add(this.numericUpDown_OBC_SpeedLimitAdj);
+            this.groupBox13.Controls.Add(this.label80);
+            this.groupBox13.Controls.Add(this.label128);
             this.groupBox13.Controls.Add(this.label64);
             this.groupBox13.Controls.Add(this.numericUpDown_OBC_OffTime);
             this.groupBox13.Controls.Add(this.label63);
@@ -3246,7 +3393,7 @@ namespace Welling_Motor_Debug_Tool
             // label64
             // 
             this.label64.AutoSize = true;
-            this.label64.Location = new System.Drawing.Point(146, 119);
+            this.label64.Location = new System.Drawing.Point(140, 119);
             this.label64.Name = "label64";
             this.label64.Size = new System.Drawing.Size(39, 21);
             this.label64.TabIndex = 14;
@@ -3255,7 +3402,7 @@ namespace Welling_Motor_Debug_Tool
             // numericUpDown_OBC_OffTime
             // 
             this.numericUpDown_OBC_OffTime.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(224)))), ((int)(((byte)(192)))));
-            this.numericUpDown_OBC_OffTime.Location = new System.Drawing.Point(83, 115);
+            this.numericUpDown_OBC_OffTime.Location = new System.Drawing.Point(83, 114);
             this.numericUpDown_OBC_OffTime.Maximum = new decimal(new int[] {
             240,
             0,
@@ -3263,14 +3410,14 @@ namespace Welling_Motor_Debug_Tool
             0});
             this.numericUpDown_OBC_OffTime.Name = "numericUpDown_OBC_OffTime";
             this.numericUpDown_OBC_OffTime.ReadOnly = true;
-            this.numericUpDown_OBC_OffTime.Size = new System.Drawing.Size(60, 28);
+            this.numericUpDown_OBC_OffTime.Size = new System.Drawing.Size(51, 28);
             this.numericUpDown_OBC_OffTime.TabIndex = 13;
             this.numericUpDown_OBC_OffTime.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
             // 
             // label63
             // 
             this.label63.AutoSize = true;
-            this.label63.Location = new System.Drawing.Point(6, 119);
+            this.label63.Location = new System.Drawing.Point(6, 118);
             this.label63.Name = "label63";
             this.label63.Size = new System.Drawing.Size(74, 21);
             this.label63.TabIndex = 12;
@@ -3281,25 +3428,25 @@ namespace Welling_Motor_Debug_Tool
             this.numericUpDown_OBC_WheelAdj.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(224)))), ((int)(((byte)(192)))));
             this.numericUpDown_OBC_WheelAdj.Location = new System.Drawing.Point(83, 24);
             this.numericUpDown_OBC_WheelAdj.Maximum = new decimal(new int[] {
-            10,
+            20,
             0,
             0,
             0});
             this.numericUpDown_OBC_WheelAdj.Minimum = new decimal(new int[] {
-            10,
+            20,
             0,
             0,
             -2147483648});
             this.numericUpDown_OBC_WheelAdj.Name = "numericUpDown_OBC_WheelAdj";
             this.numericUpDown_OBC_WheelAdj.ReadOnly = true;
-            this.numericUpDown_OBC_WheelAdj.Size = new System.Drawing.Size(60, 28);
+            this.numericUpDown_OBC_WheelAdj.Size = new System.Drawing.Size(51, 28);
             this.numericUpDown_OBC_WheelAdj.TabIndex = 7;
             this.numericUpDown_OBC_WheelAdj.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
             // 
             // label59
             // 
             this.label59.AutoSize = true;
-            this.label59.Location = new System.Drawing.Point(146, 28);
+            this.label59.Location = new System.Drawing.Point(140, 28);
             this.label59.Name = "label59";
             this.label59.Size = new System.Drawing.Size(33, 21);
             this.label59.TabIndex = 11;
@@ -4337,6 +4484,99 @@ namespace Welling_Motor_Debug_Tool
             this.textBox_FacModeSensorCal2.Text = "48";
             this.textBox_FacModeSensorCal2.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
             // 
+            // groupBox24
+            // 
+            this.groupBox24.Controls.Add(this.button_ReadRideLog);
+            this.groupBox24.Controls.Add(this.button_WriteRideLog);
+            this.groupBox24.Controls.Add(this.textBox_TRIP_KM);
+            this.groupBox24.Controls.Add(this.textBox_TRIP_TIME);
+            this.groupBox24.Controls.Add(this.textBox_ODO_KM);
+            this.groupBox24.Controls.Add(this.textBox_ODO_TIME);
+            this.groupBox24.Controls.Add(this.label126);
+            this.groupBox24.Controls.Add(this.label119);
+            this.groupBox24.Location = new System.Drawing.Point(189, 187);
+            this.groupBox24.Name = "groupBox24";
+            this.groupBox24.Size = new System.Drawing.Size(199, 125);
+            this.groupBox24.TabIndex = 7;
+            this.groupBox24.TabStop = false;
+            this.groupBox24.Text = "骑行信息";
+            // 
+            // button_ReadRideLog
+            // 
+            this.button_ReadRideLog.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
+            this.button_ReadRideLog.Location = new System.Drawing.Point(63, 92);
+            this.button_ReadRideLog.Name = "button_ReadRideLog";
+            this.button_ReadRideLog.Size = new System.Drawing.Size(60, 29);
+            this.button_ReadRideLog.TabIndex = 16;
+            this.button_ReadRideLog.Text = "查询";
+            this.button_ReadRideLog.UseVisualStyleBackColor = false;
+            this.button_ReadRideLog.Click += new System.EventHandler(this.button_ReadRideLog_Click);
+            // 
+            // button_WriteRideLog
+            // 
+            this.button_WriteRideLog.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
+            this.button_WriteRideLog.Location = new System.Drawing.Point(129, 92);
+            this.button_WriteRideLog.Name = "button_WriteRideLog";
+            this.button_WriteRideLog.Size = new System.Drawing.Size(60, 29);
+            this.button_WriteRideLog.TabIndex = 17;
+            this.button_WriteRideLog.Text = "写入";
+            this.button_WriteRideLog.UseVisualStyleBackColor = false;
+            this.button_WriteRideLog.Click += new System.EventHandler(this.button_WriteRideLog_Click);
+            // 
+            // textBox_TRIP_KM
+            // 
+            this.textBox_TRIP_KM.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
+            this.textBox_TRIP_KM.Location = new System.Drawing.Point(63, 60);
+            this.textBox_TRIP_KM.Name = "textBox_TRIP_KM";
+            this.textBox_TRIP_KM.Size = new System.Drawing.Size(60, 28);
+            this.textBox_TRIP_KM.TabIndex = 15;
+            this.textBox_TRIP_KM.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            // 
+            // textBox_TRIP_TIME
+            // 
+            this.textBox_TRIP_TIME.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
+            this.textBox_TRIP_TIME.Location = new System.Drawing.Point(129, 60);
+            this.textBox_TRIP_TIME.Name = "textBox_TRIP_TIME";
+            this.textBox_TRIP_TIME.Size = new System.Drawing.Size(60, 28);
+            this.textBox_TRIP_TIME.TabIndex = 15;
+            this.textBox_TRIP_TIME.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            // 
+            // textBox_ODO_KM
+            // 
+            this.textBox_ODO_KM.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
+            this.textBox_ODO_KM.Location = new System.Drawing.Point(63, 30);
+            this.textBox_ODO_KM.Name = "textBox_ODO_KM";
+            this.textBox_ODO_KM.Size = new System.Drawing.Size(60, 28);
+            this.textBox_ODO_KM.TabIndex = 15;
+            this.textBox_ODO_KM.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            // 
+            // textBox_ODO_TIME
+            // 
+            this.textBox_ODO_TIME.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
+            this.textBox_ODO_TIME.Location = new System.Drawing.Point(129, 30);
+            this.textBox_ODO_TIME.Name = "textBox_ODO_TIME";
+            this.textBox_ODO_TIME.Size = new System.Drawing.Size(60, 28);
+            this.textBox_ODO_TIME.TabIndex = 15;
+            this.textBox_ODO_TIME.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            // 
+            // label126
+            // 
+            this.label126.AutoSize = true;
+            this.label126.Location = new System.Drawing.Point(6, 64);
+            this.label126.Name = "label126";
+            this.label126.Size = new System.Drawing.Size(44, 21);
+            this.label126.TabIndex = 3;
+            this.label126.Text = "TRIP";
+            // 
+            // label119
+            // 
+            this.label119.AutoSize = true;
+            this.label119.Location = new System.Drawing.Point(6, 34);
+            this.label119.Name = "label119";
+            this.label119.Size = new System.Drawing.Size(48, 21);
+            this.label119.TabIndex = 3;
+            this.label119.Text = "ODO";
+            // 
             // groupBox19
             // 
             this.groupBox19.Controls.Add(this.button_FacModeInit);
@@ -6350,226 +6590,90 @@ namespace Welling_Motor_Debug_Tool
             this.label46.TabIndex = 21;
             this.label46.Text = "/";
             // 
-            // groupBox23
-            // 
-            this.groupBox23.Controls.Add(this.button_ReadTag);
-            this.groupBox23.Controls.Add(this.button_WriteTag);
-            this.groupBox23.Controls.Add(this.textBox_TagInfo);
-            this.groupBox23.Location = new System.Drawing.Point(602, 72);
-            this.groupBox23.Name = "groupBox23";
-            this.groupBox23.Size = new System.Drawing.Size(381, 107);
-            this.groupBox23.TabIndex = 4;
-            this.groupBox23.TabStop = false;
-            this.groupBox23.Text = "产品标签";
-            // 
-            // textBox_TagInfo
-            // 
-            this.textBox_TagInfo.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
-            this.textBox_TagInfo.Location = new System.Drawing.Point(9, 35);
-            this.textBox_TagInfo.Name = "textBox_TagInfo";
-            this.textBox_TagInfo.Size = new System.Drawing.Size(364, 28);
-            this.textBox_TagInfo.TabIndex = 1;
-            // 
-            // button_WriteTag
-            // 
-            this.button_WriteTag.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
-            this.button_WriteTag.Location = new System.Drawing.Point(323, 67);
-            this.button_WriteTag.Name = "button_WriteTag";
-            this.button_WriteTag.Size = new System.Drawing.Size(50, 29);
-            this.button_WriteTag.TabIndex = 2;
-            this.button_WriteTag.Text = "写入";
-            this.button_WriteTag.UseVisualStyleBackColor = false;
-            this.button_WriteTag.Click += new System.EventHandler(this.button_WriteTag_Click);
-            // 
-            // button_ReadTag
-            // 
-            this.button_ReadTag.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
-            this.button_ReadTag.Location = new System.Drawing.Point(268, 67);
-            this.button_ReadTag.Name = "button_ReadTag";
-            this.button_ReadTag.Size = new System.Drawing.Size(50, 29);
-            this.button_ReadTag.TabIndex = 2;
-            this.button_ReadTag.Text = "查询";
-            this.button_ReadTag.UseVisualStyleBackColor = false;
-            this.button_ReadTag.Click += new System.EventHandler(this.button_ReadTag_Click);
-            // 
-            // groupBox24
-            // 
-            this.groupBox24.Controls.Add(this.button_ReadRideLog);
-            this.groupBox24.Controls.Add(this.button_WriteRideLog);
-            this.groupBox24.Controls.Add(this.textBox_TRIP_KM);
-            this.groupBox24.Controls.Add(this.textBox_TRIP_TIME);
-            this.groupBox24.Controls.Add(this.textBox_ODO_KM);
-            this.groupBox24.Controls.Add(this.textBox_ODO_TIME);
-            this.groupBox24.Controls.Add(this.label126);
-            this.groupBox24.Controls.Add(this.label119);
-            this.groupBox24.Location = new System.Drawing.Point(189, 187);
-            this.groupBox24.Name = "groupBox24";
-            this.groupBox24.Size = new System.Drawing.Size(199, 125);
-            this.groupBox24.TabIndex = 7;
-            this.groupBox24.TabStop = false;
-            this.groupBox24.Text = "骑行信息";
-            // 
-            // textBox_ODO_KM
-            // 
-            this.textBox_ODO_KM.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
-            this.textBox_ODO_KM.Location = new System.Drawing.Point(63, 30);
-            this.textBox_ODO_KM.Name = "textBox_ODO_KM";
-            this.textBox_ODO_KM.Size = new System.Drawing.Size(60, 28);
-            this.textBox_ODO_KM.TabIndex = 15;
-            this.textBox_ODO_KM.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
-            // 
-            // textBox_ODO_TIME
-            // 
-            this.textBox_ODO_TIME.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
-            this.textBox_ODO_TIME.Location = new System.Drawing.Point(129, 30);
-            this.textBox_ODO_TIME.Name = "textBox_ODO_TIME";
-            this.textBox_ODO_TIME.Size = new System.Drawing.Size(60, 28);
-            this.textBox_ODO_TIME.TabIndex = 15;
-            this.textBox_ODO_TIME.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
-            // 
-            // textBox_TRIP_TIME
-            // 
-            this.textBox_TRIP_TIME.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
-            this.textBox_TRIP_TIME.Location = new System.Drawing.Point(129, 60);
-            this.textBox_TRIP_TIME.Name = "textBox_TRIP_TIME";
-            this.textBox_TRIP_TIME.Size = new System.Drawing.Size(60, 28);
-            this.textBox_TRIP_TIME.TabIndex = 15;
-            this.textBox_TRIP_TIME.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
-            // 
-            // textBox_TRIP_KM
-            // 
-            this.textBox_TRIP_KM.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
-            this.textBox_TRIP_KM.Location = new System.Drawing.Point(63, 60);
-            this.textBox_TRIP_KM.Name = "textBox_TRIP_KM";
-            this.textBox_TRIP_KM.Size = new System.Drawing.Size(60, 28);
-            this.textBox_TRIP_KM.TabIndex = 15;
-            this.textBox_TRIP_KM.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
-            // 
-            // label119
-            // 
-            this.label119.AutoSize = true;
-            this.label119.Location = new System.Drawing.Point(6, 34);
-            this.label119.Name = "label119";
-            this.label119.Size = new System.Drawing.Size(48, 21);
-            this.label119.TabIndex = 3;
-            this.label119.Text = "ODO";
-            // 
-            // label126
+            // numericUpDown_OBC_SpeedLimitAdj
             // 
-            this.label126.AutoSize = true;
-            this.label126.Location = new System.Drawing.Point(6, 64);
-            this.label126.Name = "label126";
-            this.label126.Size = new System.Drawing.Size(44, 21);
-            this.label126.TabIndex = 3;
-            this.label126.Text = "TRIP";
+            this.numericUpDown_OBC_SpeedLimitAdj.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(224)))), ((int)(((byte)(192)))));
+            this.numericUpDown_OBC_SpeedLimitAdj.Location = new System.Drawing.Point(83, 144);
+            this.numericUpDown_OBC_SpeedLimitAdj.Maximum = new decimal(new int[] {
+            20,
+            0,
+            0,
+            0});
+            this.numericUpDown_OBC_SpeedLimitAdj.Minimum = new decimal(new int[] {
+            50,
+            0,
+            0,
+            -2147483648});
+            this.numericUpDown_OBC_SpeedLimitAdj.Name = "numericUpDown_OBC_SpeedLimitAdj";
+            this.numericUpDown_OBC_SpeedLimitAdj.ReadOnly = true;
+            this.numericUpDown_OBC_SpeedLimitAdj.Size = new System.Drawing.Size(51, 28);
+            this.numericUpDown_OBC_SpeedLimitAdj.TabIndex = 15;
+            this.numericUpDown_OBC_SpeedLimitAdj.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
             // 
-            // button_ReadRideLog
+            // label80
             // 
-            this.button_ReadRideLog.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
-            this.button_ReadRideLog.Location = new System.Drawing.Point(63, 92);
-            this.button_ReadRideLog.Name = "button_ReadRideLog";
-            this.button_ReadRideLog.Size = new System.Drawing.Size(60, 29);
-            this.button_ReadRideLog.TabIndex = 16;
-            this.button_ReadRideLog.Text = "查询";
-            this.button_ReadRideLog.UseVisualStyleBackColor = false;
-            this.button_ReadRideLog.Click += new System.EventHandler(this.button_ReadRideLog_Click);
+            this.label80.AutoSize = true;
+            this.label80.Location = new System.Drawing.Point(140, 148);
+            this.label80.Name = "label80";
+            this.label80.Size = new System.Drawing.Size(51, 21);
+            this.label80.TabIndex = 17;
+            this.label80.Text = "km/h";
             // 
-            // button_WriteRideLog
+            // label128
             // 
-            this.button_WriteRideLog.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
-            this.button_WriteRideLog.Location = new System.Drawing.Point(129, 92);
-            this.button_WriteRideLog.Name = "button_WriteRideLog";
-            this.button_WriteRideLog.Size = new System.Drawing.Size(60, 29);
-            this.button_WriteRideLog.TabIndex = 17;
-            this.button_WriteRideLog.Text = "写入";
-            this.button_WriteRideLog.UseVisualStyleBackColor = false;
-            this.button_WriteRideLog.Click += new System.EventHandler(this.button_WriteRideLog_Click);
+            this.label128.AutoSize = true;
+            this.label128.Location = new System.Drawing.Point(6, 148);
+            this.label128.Name = "label128";
+            this.label128.Size = new System.Drawing.Size(74, 21);
+            this.label128.TabIndex = 16;
+            this.label128.Text = "限速微调";
             // 
-            // tabPage_BikeParam2
+            // checkBox_UserRideParam_OBC
             // 
-            this.tabPage_BikeParam2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
-            this.tabPage_BikeParam2.Controls.Add(this.button_WriteBikeParam2);
-            this.tabPage_BikeParam2.Controls.Add(this.button_ReadBikeParam2);
-            this.tabPage_BikeParam2.Controls.Add(this.richTextBox_BikeParam2);
-            this.tabPage_BikeParam2.Location = new System.Drawing.Point(4, 30);
-            this.tabPage_BikeParam2.Name = "tabPage_BikeParam2";
-            this.tabPage_BikeParam2.Size = new System.Drawing.Size(990, 315);
-            this.tabPage_BikeParam2.TabIndex = 13;
-            this.tabPage_BikeParam2.Text = "整车信息2";
+            this.checkBox_UserRideParam_OBC.AutoSize = true;
+            this.checkBox_UserRideParam_OBC.Location = new System.Drawing.Point(858, 172);
+            this.checkBox_UserRideParam_OBC.Name = "checkBox_UserRideParam_OBC";
+            this.checkBox_UserRideParam_OBC.Size = new System.Drawing.Size(93, 25);
+            this.checkBox_UserRideParam_OBC.TabIndex = 8;
+            this.checkBox_UserRideParam_OBC.Text = "模拟仪表";
+            this.checkBox_UserRideParam_OBC.UseVisualStyleBackColor = true;
             // 
-            // tabPage_UsrRideParam
+            // 删除远程文件ToolStripMenuItem
             // 
-            this.tabPage_UsrRideParam.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
-            this.tabPage_UsrRideParam.Controls.Add(this.button_WriteUsrRidetParam);
-            this.tabPage_UsrRideParam.Controls.Add(this.button_ReadUsrRideParam);
-            this.tabPage_UsrRideParam.Controls.Add(this.richTextBox_UsrRidesParam);
-            this.tabPage_UsrRideParam.Location = new System.Drawing.Point(4, 30);
-            this.tabPage_UsrRideParam.Name = "tabPage_UsrRideParam";
-            this.tabPage_UsrRideParam.Size = new System.Drawing.Size(990, 315);
-            this.tabPage_UsrRideParam.TabIndex = 14;
-            this.tabPage_UsrRideParam.Text = "用户骑行参数";
+            this.删除远程文件ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
+            this.生产配置文件ToolStripMenuItem,
+            this.样机测试记录ToolStripMenuItem});
+            this.删除远程文件ToolStripMenuItem.Name = "删除远程文件ToolStripMenuItem";
+            this.删除远程文件ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
+            this.删除远程文件ToolStripMenuItem.Text = "删除远程文件";
             // 
-            // button_WriteBikeParam2
+            // 生产配置文件ToolStripMenuItem
             // 
-            this.button_WriteBikeParam2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
-            this.button_WriteBikeParam2.Location = new System.Drawing.Point(858, 259);
-            this.button_WriteBikeParam2.Name = "button_WriteBikeParam2";
-            this.button_WriteBikeParam2.Size = new System.Drawing.Size(126, 50);
-            this.button_WriteBikeParam2.TabIndex = 7;
-            this.button_WriteBikeParam2.Text = "写入参数";
-            this.button_WriteBikeParam2.UseVisualStyleBackColor = false;
-            this.button_WriteBikeParam2.Click += new System.EventHandler(this.button_WriteBikeParam2_Click);
+            this.生产配置文件ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
+            this.toolStripTextBox_DelCfgFile});
+            this.生产配置文件ToolStripMenuItem.Name = "生产配置文件ToolStripMenuItem";
+            this.生产配置文件ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
+            this.生产配置文件ToolStripMenuItem.Text = "生产配置文件";
             // 
-            // button_ReadBikeParam2
+            // 样机测试记录ToolStripMenuItem
             // 
-            this.button_ReadBikeParam2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
-            this.button_ReadBikeParam2.Location = new System.Drawing.Point(858, 203);
-            this.button_ReadBikeParam2.Name = "button_ReadBikeParam2";
-            this.button_ReadBikeParam2.Size = new System.Drawing.Size(126, 50);
-            this.button_ReadBikeParam2.TabIndex = 6;
-            this.button_ReadBikeParam2.Text = "读取参数";
-            this.button_ReadBikeParam2.UseVisualStyleBackColor = false;
-            this.button_ReadBikeParam2.Click += new System.EventHandler(this.button_ReadBikeParam2_Click);
+            this.样机测试记录ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
+            this.toolStripTextBox_DelLogFile});
+            this.样机测试记录ToolStripMenuItem.Name = "样机测试记录ToolStripMenuItem";
+            this.样机测试记录ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
+            this.样机测试记录ToolStripMenuItem.Text = "样机测试记录";
             // 
-            // richTextBox_BikeParam2
+            // toolStripTextBox_DelCfgFile
             // 
-            this.richTextBox_BikeParam2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
-            this.richTextBox_BikeParam2.Location = new System.Drawing.Point(6, 6);
-            this.richTextBox_BikeParam2.Name = "richTextBox_BikeParam2";
-            this.richTextBox_BikeParam2.Size = new System.Drawing.Size(846, 303);
-            this.richTextBox_BikeParam2.TabIndex = 5;
-            this.richTextBox_BikeParam2.Text = "";
+            this.toolStripTextBox_DelCfgFile.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F);
+            this.toolStripTextBox_DelCfgFile.Name = "toolStripTextBox_DelCfgFile";
+            this.toolStripTextBox_DelCfgFile.Size = new System.Drawing.Size(100, 23);
             // 
-            // button_WriteUsrRidetParam
+            // toolStripTextBox_DelLogFile
             // 
-            this.button_WriteUsrRidetParam.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
-            this.button_WriteUsrRidetParam.Location = new System.Drawing.Point(858, 259);
-            this.button_WriteUsrRidetParam.Name = "button_WriteUsrRidetParam";
-            this.button_WriteUsrRidetParam.Size = new System.Drawing.Size(126, 50);
-            this.button_WriteUsrRidetParam.TabIndex = 7;
-            this.button_WriteUsrRidetParam.Text = "写入参数";
-            this.button_WriteUsrRidetParam.UseVisualStyleBackColor = false;
-            this.button_WriteUsrRidetParam.Click += new System.EventHandler(this.button_WriteUsrRidetParam_Click);
-            // 
-            // button_ReadUsrRideParam
-            // 
-            this.button_ReadUsrRideParam.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
-            this.button_ReadUsrRideParam.Location = new System.Drawing.Point(858, 203);
-            this.button_ReadUsrRideParam.Name = "button_ReadUsrRideParam";
-            this.button_ReadUsrRideParam.Size = new System.Drawing.Size(126, 50);
-            this.button_ReadUsrRideParam.TabIndex = 6;
-            this.button_ReadUsrRideParam.Text = "读取参数";
-            this.button_ReadUsrRideParam.UseVisualStyleBackColor = false;
-            this.button_ReadUsrRideParam.Click += new System.EventHandler(this.button_ReadUsrRideParam_Click);
-            // 
-            // richTextBox_UsrRidesParam
-            // 
-            this.richTextBox_UsrRidesParam.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
-            this.richTextBox_UsrRidesParam.Location = new System.Drawing.Point(6, 6);
-            this.richTextBox_UsrRidesParam.Name = "richTextBox_UsrRidesParam";
-            this.richTextBox_UsrRidesParam.Size = new System.Drawing.Size(846, 303);
-            this.richTextBox_UsrRidesParam.TabIndex = 5;
-            this.richTextBox_UsrRidesParam.Text = "";
+            this.toolStripTextBox_DelLogFile.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F);
+            this.toolStripTextBox_DelLogFile.Name = "toolStripTextBox_DelLogFile";
+            this.toolStripTextBox_DelLogFile.Size = new System.Drawing.Size(100, 23);
             // 
             // mainForm
             // 
@@ -6621,11 +6725,14 @@ namespace Welling_Motor_Debug_Tool
             this.tabPage_MotorParam.ResumeLayout(false);
             this.tabPage_BikeParam.ResumeLayout(false);
             this.tabPage_BikeParam.PerformLayout();
+            this.tabPage_BikeParam2.ResumeLayout(false);
             this.tabPage_ControlParam.ResumeLayout(false);
             this.tabPage_SensorParam.ResumeLayout(false);
             this.tabPage_SensorParam.PerformLayout();
             this.tabPage_AssistParam.ResumeLayout(false);
             this.tabPage_AssistParam.PerformLayout();
+            this.tabPage_UsrRideParam.ResumeLayout(false);
+            this.tabPage_UsrRideParam.PerformLayout();
             this.tabPage_DebugParam.ResumeLayout(false);
             this.tabPage_RecordInfo.ResumeLayout(false);
             this.tabPage_RecordInfo.PerformLayout();
@@ -6636,6 +6743,8 @@ namespace Welling_Motor_Debug_Tool
             this.groupBox18.PerformLayout();
             this.groupBox17.ResumeLayout(false);
             this.groupBox17.PerformLayout();
+            this.groupBox23.ResumeLayout(false);
+            this.groupBox23.PerformLayout();
             this.groupBox9.ResumeLayout(false);
             this.groupBox8.ResumeLayout(false);
             this.groupBox8.PerformLayout();
@@ -6674,6 +6783,8 @@ namespace Welling_Motor_Debug_Tool
             this.groupBox21.PerformLayout();
             this.groupBox20.ResumeLayout(false);
             this.groupBox20.PerformLayout();
+            this.groupBox24.ResumeLayout(false);
+            this.groupBox24.PerformLayout();
             this.groupBox19.ResumeLayout(false);
             this.tabPage_ProductMode_Write.ResumeLayout(false);
             this.tabPage_ProductMode_Write.PerformLayout();
@@ -6697,12 +6808,7 @@ namespace Welling_Motor_Debug_Tool
             this.tabPage_DebugInfo.ResumeLayout(false);
             this.tabPage_DebugInfo.PerformLayout();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
-            this.groupBox23.ResumeLayout(false);
-            this.groupBox23.PerformLayout();
-            this.groupBox24.ResumeLayout(false);
-            this.groupBox24.PerformLayout();
-            this.tabPage_BikeParam2.ResumeLayout(false);
-            this.tabPage_UsrRideParam.ResumeLayout(false);
+            ((System.ComponentModel.ISupportInitialize)(this.numericUpDown_OBC_SpeedLimitAdj)).EndInit();
             this.ResumeLayout(false);
             this.PerformLayout();
 
@@ -7257,5 +7363,14 @@ namespace Welling_Motor_Debug_Tool
         private Button button_WriteUsrRidetParam;
         private Button button_ReadUsrRideParam;
         private RichTextBox richTextBox_UsrRidesParam;
+        private NumericUpDown numericUpDown_OBC_SpeedLimitAdj;
+        private Label label80;
+        private Label label128;
+        private CheckBox checkBox_UserRideParam_OBC;
+        private ToolStripMenuItem 删除远程文件ToolStripMenuItem;
+        private ToolStripMenuItem 生产配置文件ToolStripMenuItem;
+        private ToolStripTextBox toolStripTextBox_DelCfgFile;
+        private ToolStripMenuItem 样机测试记录ToolStripMenuItem;
+        private ToolStripTextBox toolStripTextBox_DelLogFile;
     }
 }

+ 163 - 59
Welling_Motor_Debug_Tool/mainForm.cs

@@ -23,7 +23,7 @@ namespace Welling_Motor_Debug_Tool
     {
         #region 变量定义
         //版本号
-        public static string Version = "2.1.7";
+        public static string Version = "2.1.9";
         //串口实例
         Serial_Process mySerialProcess = new Serial_Process();
         string PortNumSave = "";
@@ -436,9 +436,11 @@ namespace Welling_Motor_Debug_Tool
                             //隐藏研发调试界面
                             tabPage_MotorParam.Parent = null;
                             tabPage_BikeParam.Parent = null;
+                            tabPage_BikeParam2.Parent = null;
                             tabPage_ControlParam.Parent = null;
                             tabPage_SensorParam.Parent = null;
                             tabPage_AssistParam.Parent = null;
+                            tabPage_UsrRideParam.Parent = null;
                             tabPage_DebugParam.Parent = null;
                             tabPage_RecordInfo.Parent = null;
                             tabPage_OtherInfo.Parent = null;
@@ -552,9 +554,11 @@ namespace Welling_Motor_Debug_Tool
                             //隐藏研发调试界面
                             tabPage_MotorParam.Parent = null;
                             tabPage_BikeParam.Parent = null;
+                            tabPage_BikeParam2.Parent = null;
                             tabPage_ControlParam.Parent = null;
                             tabPage_SensorParam.Parent = null;
                             tabPage_AssistParam.Parent = null;
+                            tabPage_UsrRideParam.Parent = null;
                             tabPage_DebugParam.Parent = null;
                             tabPage_RecordInfo.Parent = null;
                             tabPage_OtherInfo.Parent = null;
@@ -858,6 +862,14 @@ namespace Welling_Motor_Debug_Tool
                 }
             }
 
+            //不识别联动装置盒自动打开界面
+#if true
+            groupBox1.Visible = true;
+            groupBox3.Visible = true;
+            tabControl2.Visible = true;
+            label_StarInfo.Visible = false;
+#endif
+
             //创建线程,定时解析数据
             Thread th = new Thread(Task_SerialProcess);
             th.IsBackground = true;
@@ -1311,12 +1323,12 @@ namespace Welling_Motor_Debug_Tool
                                 this.Invoke((EventHandler)(delegate
                                 {
                                     richTextBox_MotorParam.Clear();
-                                    for (int i = 0; i < myParams.MotorParma.Count; i++)
+                                    for (int i = 0; i < myParams.MotorParam.Count; i++)
                                     {
                                         if (i == 6)
-                                            richTextBox_MotorParam.AppendText(myParams.MotorParma[i] + "=" + Convert.ToString((short)(Data[2 * i + 1] * 256 + Data[2 * i])) + ", ");
+                                            richTextBox_MotorParam.AppendText(myParams.MotorParam[i] + "=" + Convert.ToString((short)(Data[2 * i + 1] * 256 + Data[2 * i])) + ", ");
                                         else
-                                            richTextBox_MotorParam.AppendText(myParams.MotorParma[i] + "=" + Convert.ToString((ushort)(Data[2 * i + 1] * 256 + Data[2 * i])) + ", ");
+                                            richTextBox_MotorParam.AppendText(myParams.MotorParam[i] + "=" + Convert.ToString((ushort)(Data[2 * i + 1] * 256 + Data[2 * i])) + ", ");
                                     }
                                     richTextBox_MotorParam.Text = richTextBox_MotorParam.Text.Substring(0, richTextBox_MotorParam.Text.Length - 2);
                                 }));
@@ -1330,12 +1342,12 @@ namespace Welling_Motor_Debug_Tool
                                 this.Invoke((EventHandler)(delegate
                                 {
                                     richTextBox_BikeParam.Clear();
-                                    for (int i = 0; i < myParams.BikeParma.Count; i++)
+                                    for (int i = 0; i < myParams.BikeParam.Count; i++)
                                     {
                                         if (i == 9)
-                                            richTextBox_BikeParam.AppendText(myParams.BikeParma[i] + "=" + Convert.ToString((short)(Data[2 * i + 1] * 256 + Data[2 * i])) + ", ");
+                                            richTextBox_BikeParam.AppendText(myParams.BikeParam[i] + "=" + Convert.ToString((short)(Data[2 * i + 1] * 256 + Data[2 * i])) + ", ");
                                         else
-                                            richTextBox_BikeParam.AppendText(myParams.BikeParma[i] + "=" + Convert.ToString((ushort)(Data[2 * i + 1] * 256 + Data[2 * i])) + ", ");
+                                            richTextBox_BikeParam.AppendText(myParams.BikeParam[i] + "=" + Convert.ToString((ushort)(Data[2 * i + 1] * 256 + Data[2 * i])) + ", ");
                                         //更新前后灯参数
                                         if (i == 8)
                                         {
@@ -1363,9 +1375,9 @@ namespace Welling_Motor_Debug_Tool
                                 this.Invoke((EventHandler)(delegate
                                 {
                                     richTextBox_ControlParam.Clear();
-                                    for (int i = 0; i < myParams.ControlParma.Count; i++)
+                                    for (int i = 0; i < myParams.ControlParam.Count; i++)
                                     {
-                                        richTextBox_ControlParam.AppendText(myParams.ControlParma[i] + "=" + Convert.ToString((ushort)(Data[2 * i + 1] * 256 + Data[2 * i])) + ", ");
+                                        richTextBox_ControlParam.AppendText(myParams.ControlParam[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);
                                 }));
@@ -1861,21 +1873,25 @@ namespace Welling_Motor_Debug_Tool
                                     //ODO里程
                                     DataTemp32 = (long)((Data[3] << 24) + (Data[2] << 16) + (Data[1] << 8) + Data[0]);
                                     textBox_OBC_ODO_KM.Text = ((float)DataTemp32 / 10f).ToString("0.0") + " km";
+                                    textBox_ODO_KM.Text = DataTemp32.ToString();
                                     //ODO时间
                                     DataTemp32 = (long)((Data[7] << 24) + (Data[6] << 16) + (Data[5] << 8) + Data[4]);
                                     if (DataTemp32 >= 60 * 100000)
                                         textBox_OBC_ODO_TIME.Text = Convert.ToString(DataTemp32 / 60) + " h";
                                     else
                                         textBox_OBC_ODO_TIME.Text = Convert.ToString(DataTemp32 / 60) + " h " + Convert.ToString(DataTemp32 % 60) + " m";
+                                    textBox_ODO_TIME.Text = DataTemp32.ToString();
                                     //TRIP里程
                                     DataTemp32 = (long)((Data[11] << 24) + (Data[10] << 16) + (Data[9] << 8) + Data[8]);
                                     textBox_OBC_TRIP_KM.Text = ((float)DataTemp32 / 10f).ToString("0.0") + " km";
+                                    textBox_TRIP_KM.Text = DataTemp32.ToString();
                                     //TRIP时间
                                     DataTemp32 = (long)((Data[15] << 24) + (Data[14] << 16) + (Data[13] << 8) + Data[12]);
                                     if (DataTemp32 >= 60 * 100000)
                                         textBox_OBC_TRIP_TIME.Text = Convert.ToString(DataTemp32 / 60) + " h";
                                     else
                                         textBox_OBC_TRIP_TIME.Text = Convert.ToString(DataTemp32 / 60) + " h " + Convert.ToString(DataTemp32 % 60) + " m";
+                                    textBox_TRIP_TIME.Text = DataTemp32.ToString();
                                 }));
                             }
                             break;
@@ -1968,6 +1984,22 @@ namespace Welling_Motor_Debug_Tool
                             }
                             break;
                         }
+                    case 0xBB20: //产品标签信息
+                        {
+                            unchecked
+                            {
+                                this.Invoke((EventHandler)(delegate
+                                {
+                                    //产品标签
+                                    textBox_TagInfo.Text = "";                                    
+                                    for (ushort i = 0; i < 32; i++)
+                                    {
+                                        textBox_TagInfo.Text += ((char)Data[i]).ToString();
+                                    }                                    
+                                }));
+                            }
+                            break;
+                        }
                     case 0xBC20: //内阻校正信息
                         {
                             unchecked
@@ -2003,6 +2035,40 @@ namespace Welling_Motor_Debug_Tool
                             }
                             break;
                         }
+                    case 0xBD20: //整车信息2
+                        {
+                            unchecked
+                            {
+                                this.Invoke((EventHandler)(delegate
+                                {
+                                    richTextBox_BikeParam2.Clear();
+                                    for (int i = 0; i < myParams.BikeParam2.Count; i++)
+                                    {                                        
+                                        richTextBox_BikeParam2.AppendText(myParams.BikeParam2[i] + "=" + Convert.ToString((short)(Data[2 * i + 1] * 256 + Data[2 * i])) + ", ");                                                                                                                   
+                                    }
+                                    richTextBox_BikeParam2.Text = richTextBox_BikeParam2.Text.Substring(0, richTextBox_BikeParam2.Text.Length - 2);
+
+                                }));
+                            }
+                            break;
+                        }
+                    case 0xBE20: //用户骑行参数
+                        {
+                            unchecked
+                            {
+                                this.Invoke((EventHandler)(delegate
+                                {
+                                    richTextBox_UsrRidesParam.Clear();
+                                    for (int i = 0; i < myParams.UsrRideParam.Count; i++)
+                                    {
+                                        richTextBox_UsrRidesParam.AppendText(myParams.UsrRideParam[i] + "=" + Convert.ToString(Data[i]) + ", ");
+                                    }
+                                    richTextBox_UsrRidesParam.Text = richTextBox_UsrRidesParam.Text.Substring(0, richTextBox_UsrRidesParam.Text.Length - 2);
+
+                                }));
+                            }
+                            break;
+                        }
                     case 0xC109: //Boot版本信息
                         {
                             BootInfo = "";
@@ -2092,6 +2158,9 @@ namespace Welling_Motor_Debug_Tool
                                     //关机时间
                                     richTextBox_OBC_ReadUserInfo.AppendText("关机时间:" + Convert.ToString(Data[5]) + " min" + "\r\n");
                                     numericUpDown_OBC_OffTime.Value = (int)Data[5];
+                                    //限速微调
+                                    numericUpDown_OBC_SpeedLimitAdj.Value = (int)(Data[6] > 128 ? (Data[6] - 256) : Data[6]);
+                                    richTextBox_OBC_ReadUserInfo.AppendText("限速微调:" + Convert.ToString(numericUpDown_OBC_SpeedLimitAdj.Value) + " km/h" + "\r\n");
                                 }));
                             }
                             break;
@@ -3483,10 +3552,16 @@ namespace Welling_Motor_Debug_Tool
                 timer_1s.Enabled = true;
                 return;
             }
+            //周长微调
             UserInfoCode[0] = (byte)(int)numericUpDown_OBC_WheelAdj.Value;
+            //启动模式
             UserInfoCode[1] = (byte)(comboBox_OBC_StartMode.SelectedIndex + 1);
+            //助力方案
             UserInfoCode[2] = (byte)(comboBox_OBC_AssistFunc.SelectedIndex + 1);
+            //自动关机时间
             UserInfoCode[3] = (byte)(uint)numericUpDown_OBC_OffTime.Value;
+            //限速微调
+            UserInfoCode[4] = (byte)(int)numericUpDown_OBC_SpeedLimitAdj.Value;
             mySerialProcess.SendCmd((ushort)0x731, (byte)0x16, (ushort)0x3408, UserInfoCode);
         }
 
@@ -3531,6 +3606,10 @@ namespace Welling_Motor_Debug_Tool
             textBox_OBC_TRIP_TIME.Text = "";
             textBox_OBC_ODO_KM.Text = "";
             textBox_OBC_ODO_TIME.Text = "";
+            textBox_ODO_KM.Text = "---";
+            textBox_ODO_TIME.Text = "---";
+            textBox_TRIP_KM.Text = "---";
+            textBox_TRIP_TIME.Text = "---";
             mySerialProcess.SendCmd((ushort)0x731, (byte)0x11, (ushort)0x3500, null);
         }
 
@@ -5778,7 +5857,7 @@ namespace Welling_Motor_Debug_Tool
             Code[0] = 0xF1;
             mySerialProcess.SendCmd(0x7FF, 0x16, 0x2201, Code);
             ACK_WaitCnt = 0;
-            while (ACK_WaitCnt <= 2); //1s
+            while (ACK_WaitCnt <= 7); //3.5s
 
             //检查BOOT版本
             if (BootInfo != string.Empty)
@@ -5843,7 +5922,7 @@ namespace Welling_Motor_Debug_Tool
                     Code[0] = 0xF1;
                     mySerialProcess.SendCmd(0x7FF, 0x16, 0x2201, Code);
                     ACK_WaitCnt = 0;
-                    while (ACK_WaitCnt <= 4); //2s
+                    while (ACK_WaitCnt <= 7); //3.5s
 
                     //获取Boot版本信息
                     if (BootInfo != string.Empty)
@@ -7115,7 +7194,7 @@ namespace Welling_Motor_Debug_Tool
             Code[0] = 0xF1;
             mySerialProcess.SendCmd(0x7FF, 0x16, 0x2201, Code);
             ACK_WaitCnt = 0;
-            while (ACK_WaitCnt <= 2) ; //1s
+            while (ACK_WaitCnt <= 6) ; //3s
 
             //检查BOOT版本
             if (BootInfo != string.Empty)
@@ -8066,7 +8145,10 @@ namespace Welling_Motor_Debug_Tool
         private void button_ReadUsrRideParam_Click(object sender, EventArgs e)
         {
             richTextBox_UsrRidesParam.Clear();
-            mySerialProcess.SendCmd((ushort)0x751, (byte)0x11, (ushort)0x4A00, null);
+            if (checkBox_UserRideParam_OBC.Checked)
+                mySerialProcess.SendCmd((ushort)0x731, (byte)0x11, (ushort)0x4300, null);
+            else
+                mySerialProcess.SendCmd((ushort)0x751, (byte)0x11, (ushort)0x4A00, null);
         }
 
         /// <summary>
@@ -8079,27 +8161,46 @@ namespace Welling_Motor_Debug_Tool
             var ConfigParam = new byte[34];
             for (int i = 0; i < 34; i++)
                 ConfigParam[i] = 0;
-            ConfigParam[0] = (byte)((写入存储ToolStripMenuItem.Checked) ? 0x01 : 0x00);
 
-            string[] strDataTemp = richTextBox_UsrRidesParam.Text.Split(new string[] { ", " }, StringSplitOptions.None);
-            try
+            if (checkBox_UserRideParam_OBC.Checked)
             {
-                for (int i = 0; i < strDataTemp.Length; i++)
+                ConfigParam[0] = (byte)((写入存储ToolStripMenuItem.Checked) ? 0x01 : 0x00);
+
+                string[] strDataTemp = richTextBox_UsrRidesParam.Text.Split(new string[] { ", " }, StringSplitOptions.None);
+                try
                 {
-                    short wDataTemp = 0;
-                    wDataTemp = Convert.ToInt16(strDataTemp[i].Split('=')[1]);
-                    wDataTemp = Convert.ToInt16(strDataTemp[i].Split('=')[1]);
-                    ConfigParam[2 * i + 2] = (byte)wDataTemp;
-                    ConfigParam[2 * i + 3] = (byte)(wDataTemp >> 8);
+                    for (int i = 0; i < strDataTemp.Length; i++)
+                    {
+                        ConfigParam[i + 2] = Convert.ToByte(strDataTemp[i].Split('=')[1]);
+                    }
+                    mySerialProcess.SendCmd((ushort)0x751, (byte)0x16, (ushort)0x4B22, ConfigParam);
+                }
+                catch (Exception)
+                {
+                    timer_1s.Enabled = false;
+                    MessageBox.Show("数据格式不正确", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
+                    timer_1s.Enabled = true;
                 }
-                mySerialProcess.SendCmd((ushort)0x751, (byte)0x16, (ushort)0x4B22, ConfigParam);
             }
-            catch (Exception)
+            else
             {
-                timer_1s.Enabled = false;
-                MessageBox.Show("数据格式不正确", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
-                timer_1s.Enabled = true;
+                string[] strDataTemp = richTextBox_UsrRidesParam.Text.Split(new string[] { ", " }, StringSplitOptions.None);
+                try
+                {
+                    for (int i = 0; i < strDataTemp.Length; i++)
+                    {
+                        ConfigParam[i] = Convert.ToByte(strDataTemp[i].Split('=')[1]);
+                    }
+                    mySerialProcess.SendCmd((ushort)0x731, (byte)0x16, (ushort)0x4420, ConfigParam);
+                }
+                catch (Exception)
+                {
+                    timer_1s.Enabled = false;
+                    MessageBox.Show("数据格式不正确", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
+                    timer_1s.Enabled = true;
+                }
             }
+            
         }
 
         /// <summary>
@@ -8120,23 +8221,15 @@ namespace Welling_Motor_Debug_Tool
         /// <param name="e"></param>
         private void button_WriteTag_Click(object sender, EventArgs e)
         {
-            string User = textBox_User1.Text;
+            string User = textBox_TagInfo.Text;
             var UserArray = new byte[32];
 
             for (ushort i = 0; i < User.Length; i++)
             {
                 UserArray[i] = (byte)User[i];
             }
-            if (User.Length < 32)
-            {
-                UserArray[User.Length] = (byte)'.';
-                for (ushort i = 0; i < 32 - User.Length - 1; i++)
-                {
-                    UserArray[User.Length + 1 + i] = 0x20;
-                }
-            }
 
-            mySerialProcess.SendCmd((ushort)0x751, (byte)0x16, (ushort)0xBB20, UserArray);
+            mySerialProcess.SendCmd((ushort)0x751, (byte)0x16, (ushort)0x3D20, UserArray);
         }
 
         /// <summary>
@@ -8150,6 +8243,10 @@ namespace Welling_Motor_Debug_Tool
             textBox_ODO_TIME.Text = "---";
             textBox_TRIP_KM.Text = "---";
             textBox_TRIP_TIME.Text = "---";
+            textBox_OBC_TRIP_KM.Text = "";
+            textBox_OBC_TRIP_TIME.Text = "";
+            textBox_OBC_ODO_KM.Text = "";
+            textBox_OBC_ODO_TIME.Text = "";
             mySerialProcess.SendCmd((ushort)0x751, (byte)0x11, (ushort)0x2E00, null);
         }
 
@@ -8163,28 +8260,35 @@ namespace Welling_Motor_Debug_Tool
             UInt32 Data;
             var UserArray = new byte[16];
 
-            Data = Convert.ToUInt32(textBox_ODO_KM.Text);
-            UserArray[0] = (byte)(Data & 0xFF);
-            UserArray[1] = (byte)(Data >> 8);
-            UserArray[2] = (byte)(Data >> 16);
-            UserArray[3] = (byte)(Data >> 24);
-            Data = Convert.ToUInt32(textBox_ODO_TIME.Text);
-            UserArray[4] = (byte)(Data & 0xFF);
-            UserArray[5] = (byte)(Data >> 8);
-            UserArray[6] = (byte)(Data >> 16);
-            UserArray[7] = (byte)(Data >> 24);
-            Data = Convert.ToUInt32(textBox_TRIP_KM.Text);
-            UserArray[8] = (byte)(Data & 0xFF);
-            UserArray[9] = (byte)(Data >> 8);
-            UserArray[10] = (byte)(Data >> 16);
-            UserArray[11] = (byte)(Data >> 24);
-            Data = Convert.ToUInt32(textBox_TRIP_TIME.Text);
-            UserArray[12] = (byte)(Data & 0xFF);
-            UserArray[13] = (byte)(Data >> 8);
-            UserArray[14] = (byte)(Data >> 16);
-            UserArray[15] = (byte)(Data >> 24);
-
-            mySerialProcess.SendCmd((ushort)0x751, (byte)0x16, (ushort)0xBB20, UserArray);
+            try
+            {
+                Data = Convert.ToUInt32(textBox_ODO_KM.Text);
+                UserArray[0] = (byte)(Data & 0xFF);
+                UserArray[1] = (byte)(Data >> 8);
+                UserArray[2] = (byte)(Data >> 16);
+                UserArray[3] = (byte)(Data >> 24);
+                Data = Convert.ToUInt32(textBox_ODO_TIME.Text);
+                UserArray[4] = (byte)(Data & 0xFF);
+                UserArray[5] = (byte)(Data >> 8);
+                UserArray[6] = (byte)(Data >> 16);
+                UserArray[7] = (byte)(Data >> 24);
+                Data = Convert.ToUInt32(textBox_TRIP_KM.Text);
+                UserArray[8] = (byte)(Data & 0xFF);
+                UserArray[9] = (byte)(Data >> 8);
+                UserArray[10] = (byte)(Data >> 16);
+                UserArray[11] = (byte)(Data >> 24);
+                Data = Convert.ToUInt32(textBox_TRIP_TIME.Text);
+                UserArray[12] = (byte)(Data & 0xFF);
+                UserArray[13] = (byte)(Data >> 8);
+                UserArray[14] = (byte)(Data >> 16);
+                UserArray[15] = (byte)(Data >> 24);
+
+                mySerialProcess.SendCmd((ushort)0x751, (byte)0x16, (ushort)0x3B10, UserArray);
+            }
+            catch (Exception ex)
+            {
+                MessageBox.Show("数据格式错误!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
+            }
         }
     }
 }

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


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