Selaa lähdekoodia

V2.5.5
1,参数生成界面后灯模式增加模式7和模式8;
2,参数检验时不对力矩传感器零点值和标定值与写入参数对比校验;
3,参数检验时无规律出现参数校验失败提示,增加异常提示。

dd 1 kuukausi sitten
vanhempi
sitoutus
ac9472e383

BIN
.vs/Welling_Motor_Debug_Tool/v17/.suo


+ 3 - 1
Welling_Motor_Debug_Tool/GenerateParams.Designer.cs

@@ -465,7 +465,9 @@
             "3",
             "4",
             "5",
-            "6"});
+            "6",
+            "7",
+            "8"});
             this.comboBox_BikeModeB.Location = new System.Drawing.Point(240, 96);
             this.comboBox_BikeModeB.Name = "comboBox_BikeModeB";
             this.comboBox_BikeModeB.Size = new System.Drawing.Size(65, 29);

+ 1 - 1
Welling_Motor_Debug_Tool/GenerateParams.cs

@@ -860,7 +860,7 @@ namespace Welling_Motor_Debug_Tool
                                     comboBox_BikeVolB.SelectedIndex = 1;
                                 else
                                     comboBox_BikeVolB.SelectedIndex = -1;
-                                //后灯模式c
+                                //后灯模式
                                 comboBox_BikeModeB.SelectedIndex = (LightParams >> 12) - 1;
                                 //启动模式
                                 comboBox_BikeStartMode.SelectedIndex = Convert.ToUInt16(arrText[rowNum + 12].ToString().Split(',')[1]) - 1;

+ 2 - 2
Welling_Motor_Debug_Tool/TorqueParams.cs

@@ -89,9 +89,9 @@ namespace Welling_Motor_Debug_Tool
                 K4.Min = Convert.ToUInt16(userInfo[4].Split(',')[1]);
                 K4.Max = Convert.ToUInt16(userInfo[4].Split(',')[2]);
             }
-            catch (System.Exception)
+            catch (System.Exception ex)
             {
-                MessageBox.Show("文件读取失败", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                MessageBox.Show("文件读取失败" + ex.Message, "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
             }
 
         }

+ 5 - 0
Welling_Motor_Debug_Tool/Version.cs

@@ -18,6 +18,11 @@ namespace Welling_Motor_Debug_Tool
         //修改记录
         string ChangeLog = "修改记录:\r\n" +
             "V" + mainForm.Version + "\r\n" +
+            "1,参数生成界面后灯模式增加模式7和模式8;\r\n" +
+            "2,参数检验时不对力矩传感器零点值和标定值与写入参数对比校验;\r\n" +
+            "3,参数检验时无规律出现参数校验失败提示,增加异常提示。\r\n" +
+            "\r\n" +
+            "V2.5.4\r\n" +
             "1,加快参数写入和读取时间;\r\n" +
             "2,量产测试增加样机测试功能,勾选配置菜单里样机测试时不用选择配置文件,标签用两个空格把型号和SN分割;\r\n" +
             "3,导出参数增加重发机制;\r\n" +

+ 12 - 7
Welling_Motor_Debug_Tool/mainForm.cs

@@ -27,7 +27,7 @@ namespace Welling_Motor_Debug_Tool
     {
         #region 变量定义
         //版本号
-        public static string Version = "2.5.4";
+        public static string Version = "2.5.5";
         //串口实例
         Serial_Process mySerialProcess = new Serial_Process();
         string PortNumSave = "";
@@ -6978,13 +6978,14 @@ namespace Welling_Motor_Debug_Tool
                         }
                     }
                 }
-                catch (System.Exception)
+                catch (System.Exception ex)
                 {
                     label_FacModeStatus.Text = "存在故障!";
                     label_FacModeResult.BackColor = Color.Red;
                     label_FacModeResult.Text = "标签格式错误";
                     button__FacMode_Start.Enabled = true;
                     textBox_FacModeScan.Enabled = true;
+                    System.Windows.Forms.MessageBox.Show(ex.Message);
                     return;
                 }
             }
@@ -7010,13 +7011,14 @@ namespace Welling_Motor_Debug_Tool
                         return;
                     }
                 }
-                catch (System.Exception)
+                catch (System.Exception ex)
                 {
                     label_FacModeStatus.Text = "存在故障!";
                     label_FacModeResult.BackColor = Color.Red;
                     label_FacModeResult.Text = "标签格式错误";
                     button__FacMode_Start.Enabled = true;
                     textBox_FacModeScan.Enabled = true;
+                    System.Windows.Forms.MessageBox.Show(ex.Message);
                     return;
                 }
             }
@@ -10048,13 +10050,14 @@ namespace Welling_Motor_Debug_Tool
                     }
                 }
             }
-            catch (System.Exception)
+            catch (System.Exception ex)
             {
                 label_CheckModeStatus.Text = "存在故障!";
                 label_CheckModeResult.BackColor = Color.Red;
                 label_CheckModeResult.Text = "标签格式错误";
                 button_CheckModeStart.Enabled = true;
                 textBox_CheckModeScan.Enabled = true;
+                System.Windows.Forms.MessageBox.Show(ex.Message);
                 return;
             }
 
@@ -10580,6 +10583,7 @@ namespace Welling_Motor_Debug_Tool
                                 }
                             } 
                         }
+                        richTextBox_CheckModeLog.AppendText(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "->" + key + "读取成功" + "\r\n");
                         //比较当前指令,读取的配置文件和返回数据比较
                         string ParamWrite = ConfigCmd[key].Substring(24, ConfigCmd[key].Length - 40).Trim();
                         string ParamRead = "";
@@ -10598,10 +10602,11 @@ namespace Welling_Motor_Debug_Tool
                             CheckMode_Stop(false);
                             return;
                         }
+                        richTextBox_CheckModeLog.AppendText(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "->" + key + "返回指令正确,比较参数" + "\r\n");
                         if (string.Compare(key, "[其它传感器参数]") == 0)
                             ParamRead = CmdRevStrTemp.Substring(90, CmdRevStrTemp.Length - 90).Trim(); //去掉命令字、力矩传感器标定参数
                         else if (string.Compare(key, "[力矩传感器参数]") == 0)
-                            ParamRead = CmdRevStrTemp.Substring(6, CmdRevStrTemp.Length - 6 - 36).Trim(); //去掉命令字、其它传感器参数
+                            ParamRead = CmdRevStrTemp.Substring(36, CmdRevStrTemp.Length - 6 - 30 - 36).Trim(); //去掉命令字、零点、其它传感器参数
                         else if (string.Compare(key, "[控制参数]") == 0)
                             ParamRead = CmdRevStrTemp.Substring(18, CmdRevStrTemp.Length - 18).Trim(); //去掉命令字、位置零点
                         else
@@ -10627,9 +10632,9 @@ namespace Welling_Motor_Debug_Tool
 
                     }
                 }
-                catch (System.Exception)
+                catch (System.Exception ex)
                 {
-                    richTextBox_CheckModeLog.AppendText(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "->" + "参数检验失败" + "\r\n");
+                    richTextBox_CheckModeLog.AppendText(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "->" + "参数检验失败,错误原因:" + ex.Message + "\r\n");
                     label_CheckModeStatus.Text = "存在故障!";
                     label_CheckModeResult.BackColor = Color.Red;
                     label_CheckModeResult.Text = "测试异常";

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