|
@@ -637,7 +637,7 @@ namespace MOTINOVA_Motor_Factory_Set
|
|
|
button_Generate.Text = "转换中";
|
|
|
|
|
|
//保存为Excel文件
|
|
|
- string importExcelName = "FOQC成机参数检验标准_Temple.xls";
|
|
|
+ string importExcelName = "FOQC成机参数检验标准_Temple2.xls";
|
|
|
string exportExcelName = FilePath + Datenow + textBox_Model.Text + "_" + textBox_Client.Text + "_" + ((textBox_Remark.Text == string.Empty) ? "" : textBox_Remark.Text + "_") + DateTime.Now.ToString("yyyy-MM-dd-HHmmss") + ".xls";
|
|
|
|
|
|
try
|
|
@@ -651,14 +651,14 @@ namespace MOTINOVA_Motor_Factory_Set
|
|
|
#region 开始按行写入单元格
|
|
|
//第3行,文件信息
|
|
|
IRow row = sheet.GetRow(2);
|
|
|
- row.GetCell(0).SetCellValue("文件信息:" + textBox_Model.Text + "_" + textBox_Client.Text + "_" + ((textBox_Remark.Text == string.Empty) ? "" : textBox_Remark.Text + "_") + DateTime.Now.ToString("yyyy-MM-dd-HHmmss"));
|
|
|
+ row.GetCell(0).SetCellValue("文件信息 File Info:" + textBox_Model.Text + "_" + textBox_Client.Text + "_" + ((textBox_Remark.Text == string.Empty) ? "" : textBox_Remark.Text + "_") + DateTime.Now.ToString("yyyy-MM-dd-HHmmss"));
|
|
|
//第5行,第2列型号,第10列SPORT加速
|
|
|
row = sheet.GetRow(4);
|
|
|
row.GetCell(1).SetCellValue(textBox_Model.Text);
|
|
|
row.GetCell(9).SetCellValue(textBox_SPORT_Acc.Text);
|
|
|
//第6行,第2列SN,第10列TURBO增益
|
|
|
row = sheet.GetRow(5);
|
|
|
- row.GetCell(1).SetCellValue("与打标一致");
|
|
|
+ row.GetCell(1).SetCellValue("Same as marking");
|
|
|
row.GetCell(9).SetCellValue(textBox_TURBO_Gain.Text);
|
|
|
//第7行,第2列硬件板号,第10列TURBO加速
|
|
|
row = sheet.GetRow(6);
|
|
@@ -686,48 +686,48 @@ namespace MOTINOVA_Motor_Factory_Set
|
|
|
row.GetCell(9).SetCellValue(textBox_Rate_Vol.Text + " V");
|
|
|
//第13行,第2列指拨模式,第10列速度信号个数
|
|
|
row = sheet.GetRow(12);
|
|
|
- row.GetCell(1).SetCellValue(comboBox_GasMode.Text);
|
|
|
+ row.GetCell(1).SetCellValue(comboBox_GasMode.Text == "不支持" ? "不支持 No" : "支持 Yes");
|
|
|
row.GetCell(9).SetCellValue(textBox_SpeedSensor.Text);
|
|
|
//第14行,第2列启动模式,第10列踏频启动信号个数
|
|
|
row = sheet.GetRow(13);
|
|
|
- row.GetCell(1).SetCellValue(comboBox_StartMode.Text);
|
|
|
+ row.GetCell(1).SetCellValue(comboBox_StartMode.Text == "柔和" ? "柔和 Comfort" : comboBox_StartMode.Text == "正常" ? "正常 Normal" : "强劲 Dynamic");
|
|
|
row.GetCell(9).SetCellValue(textBox_CadenceStart.Text);
|
|
|
//第15行,第2列停机时间,第10列车速信号来源
|
|
|
row = sheet.GetRow(14);
|
|
|
row.GetCell(1).SetCellValue(textBox_StopTime.Text + " ms");
|
|
|
- row.GetCell(9).SetCellValue(comboBox_SpeedSensor.Text);
|
|
|
+ row.GetCell(9).SetCellValue(comboBox_SpeedSensor.Text == "传感器" ? "传感器 Sensor" : comboBox_SpeedSensor.Text == "踏频" ? "踏频 Cadence" : "通信 CAN");
|
|
|
//第16行,第2列限速,第10列轮胎周长微调
|
|
|
row = sheet.GetRow(15);
|
|
|
row.GetCell(1).SetCellValue(textBox_SpeedLimit.Text + " km/h");
|
|
|
row.GetCell(9).SetCellValue(textBox_WheelSizeAdj.Text + " cm");
|
|
|
//第17行,第2列下降速度,第10列推行转速
|
|
|
row = sheet.GetRow(16);
|
|
|
- row.GetCell(1).SetCellValue(textBox_Dec.Text + " 级");
|
|
|
+ row.GetCell(1).SetCellValue("Level " + textBox_Dec.Text);
|
|
|
row.GetCell(9).SetCellValue(textBox_WalkSpeed.Text + " rpm");
|
|
|
//第18行,第2列前齿,第10列俯仰角零偏
|
|
|
row = sheet.GetRow(17);
|
|
|
row.GetCell(1).SetCellValue(textBox_T_Front.Text + " T");
|
|
|
- row.GetCell(9).SetCellValue(textBox_Angle_P.Text + " 度");
|
|
|
+ row.GetCell(9).SetCellValue(textBox_Angle_P.Text + " °");
|
|
|
//第19行,第2列后齿,第10列横滚角零偏
|
|
|
row = sheet.GetRow(18);
|
|
|
row.GetCell(1).SetCellValue(textBox_T_Tail.Text + " T");
|
|
|
- row.GetCell(9).SetCellValue(textBox_Angle_R.Text + " 度");
|
|
|
+ row.GetCell(9).SetCellValue(textBox_Angle_R.Text + " °");
|
|
|
//第20行,第2列限流,第10列姿态传感器
|
|
|
row = sheet.GetRow(19);
|
|
|
row.GetCell(1).SetCellValue(textBox_MaxCurrent.Text + " A");
|
|
|
- row.GetCell(9).SetCellValue(comboBox_AstSensor.Text);
|
|
|
+ row.GetCell(9).SetCellValue(comboBox_AstSensor.Text == "不支持" ? "不支持 No" : "支持 Yes");
|
|
|
//第21行,第2列温度预警,第10列尾灯模式
|
|
|
row = sheet.GetRow(20);
|
|
|
row.GetCell(1).SetCellValue(textBox_NTC_Alarm.Text + " ℃");
|
|
|
- row.GetCell(9).SetCellValue(comboBox_LightMode.Text);
|
|
|
+ row.GetCell(9).SetCellValue(comboBox_LightMode.Text.Replace("模式", "Mode"));
|
|
|
//第22行,第2列温度保护,第10列前灯电压
|
|
|
row = sheet.GetRow(21);
|
|
|
row.GetCell(1).SetCellValue(textBox_NTC_Ptotect.Text + " ℃");
|
|
|
- row.GetCell(9).SetCellValue(comboBox_HeadLightVol.Text.Contains("随电池") ? comboBox_HeadLightVol.Text + " " + textBox_Rate_Vol.Text + " V" : comboBox_HeadLightVol.Text);
|
|
|
+ row.GetCell(9).SetCellValue(comboBox_HeadLightVol.Text.Contains("随电池") ? comboBox_HeadLightVol.Text + " " + textBox_Rate_Vol.Text + " V" : comboBox_HeadLightVol.Text.Contains("硬件") ? "硬件配置 By HW" : comboBox_HeadLightVol.Text);
|
|
|
//第23行,第2列码表,第10列后灯电压
|
|
|
row = sheet.GetRow(22);
|
|
|
- row.GetCell(1).SetCellValue(comboBox_NoPBU.Text);
|
|
|
- row.GetCell(9).SetCellValue(comboBox_TailLightVol.Text.Contains("随电池") ? comboBox_TailLightVol.Text + " " + textBox_Rate_Vol.Text + " V" : comboBox_TailLightVol.Text);
|
|
|
+ row.GetCell(1).SetCellValue(comboBox_NoPBU.Text == "有" ? "有 Yes" : "无 No");
|
|
|
+ row.GetCell(9).SetCellValue(comboBox_TailLightVol.Text.Contains("随电池") ? comboBox_TailLightVol.Text + " " + textBox_Rate_Vol.Text + " V" : comboBox_TailLightVol.Text.Contains("硬件") ? "硬件配置 By HW" : comboBox_TailLightVol.Text);
|
|
|
//第24行,第2列轮胎周长,第10列启动值
|
|
|
row = sheet.GetRow(23);
|
|
|
row.GetCell(1).SetCellValue(textBox_WheelSize.Text + " cm");
|
|
@@ -742,14 +742,14 @@ namespace MOTINOVA_Motor_Factory_Set
|
|
|
if ((textBox_Model.Text.Contains("PG")) || (textBox_Model.Text.Contains("PS")) || (textBox_Model.Text.Contains("J01")))
|
|
|
row.GetCell(9).SetCellValue(textBox_K_Min.Text + " - " + textBox_K_Max.Text);
|
|
|
else
|
|
|
- row.GetCell(9).SetCellValue("无此项目");
|
|
|
+ row.GetCell(9).SetCellValue("无此项目 None");
|
|
|
//第27行,第2列推行限速,第10列校正系数3
|
|
|
row = sheet.GetRow(26);
|
|
|
row.GetCell(1).SetCellValue(textBox_Walk_SpeedLimit.Text + " km/h");
|
|
|
if ((textBox_Model.Text.Contains("PG")) || (textBox_Model.Text.Contains("PS")) || (textBox_Model.Text.Contains("J01")))
|
|
|
row.GetCell(9).SetCellValue(textBox_K_Min.Text + " - " + textBox_K_Max.Text);
|
|
|
else
|
|
|
- row.GetCell(9).SetCellValue("无此项目");
|
|
|
+ row.GetCell(9).SetCellValue("无此项目 None");
|
|
|
//第28行,第2列ECO增益,第10列零点值1
|
|
|
row = sheet.GetRow(27);
|
|
|
row.GetCell(1).SetCellValue(textBox_ECO_Gain.Text);
|
|
@@ -760,14 +760,14 @@ namespace MOTINOVA_Motor_Factory_Set
|
|
|
if ((textBox_Model.Text.Contains("PG")) || (textBox_Model.Text.Contains("PS")) || (textBox_Model.Text.Contains("J01")))
|
|
|
row.GetCell(9).SetCellValue(textBox_Zero_Min.Text + " - " + textBox_Zero_Max.Text);
|
|
|
else
|
|
|
- row.GetCell(9).SetCellValue("无此项目");
|
|
|
+ row.GetCell(9).SetCellValue("无此项目 None");
|
|
|
//第30行,第2列NORM增益,第10列零点值3
|
|
|
row = sheet.GetRow(29);
|
|
|
row.GetCell(1).SetCellValue(textBox_NORM_Gain.Text);
|
|
|
if ((textBox_Model.Text.Contains("PG")) || (textBox_Model.Text.Contains("PS")) || (textBox_Model.Text.Contains("J01")))
|
|
|
row.GetCell(9).SetCellValue(textBox_Zero_Min.Text + " - " + textBox_Zero_Max.Text);
|
|
|
else
|
|
|
- row.GetCell(9).SetCellValue("无此项目");
|
|
|
+ row.GetCell(9).SetCellValue("无此项目 None");
|
|
|
//第31行,第2列NORM加速,第10列骑行历史
|
|
|
row = sheet.GetRow(30);
|
|
|
row.GetCell(1).SetCellValue(textBox_NORM_Acc.Text);
|
|
@@ -775,7 +775,7 @@ namespace MOTINOVA_Motor_Factory_Set
|
|
|
//第32行,第2列SPORT增益,第10列骑行历史
|
|
|
row = sheet.GetRow(31);
|
|
|
row.GetCell(1).SetCellValue(textBox_SPORT_Gain.Text);
|
|
|
- row.GetCell(9).SetCellValue("无故障记录");
|
|
|
+ row.GetCell(9).SetCellValue("无故障记录 None");
|
|
|
|
|
|
#endregion
|
|
|
|
|
@@ -861,7 +861,7 @@ namespace MOTINOVA_Motor_Factory_Set
|
|
|
textBox_RatePower.Text = "250";//额定功率
|
|
|
textBox_RateSpeed.Text = "1200";//额定转速
|
|
|
textBox_Rate_Vol.Text = "36";//额定电压
|
|
|
- textBox_NC_Current.Text = "1000";//空载电流
|
|
|
+ textBox_NC_Current.Text = "800";//空载电流
|
|
|
textBox_GasSpeedTh.Text = "1000";//指拨转速
|
|
|
textBox_Zero_Min.Text = "100";//零偏下限
|
|
|
textBox_Zero_Max.Text = "2000";//零偏上限
|
|
@@ -877,7 +877,7 @@ namespace MOTINOVA_Motor_Factory_Set
|
|
|
textBox_RatePower.Text = "250";//额定功率
|
|
|
textBox_RateSpeed.Text = "1200";//额定转速
|
|
|
textBox_Rate_Vol.Text = "36";//额定电压
|
|
|
- textBox_NC_Current.Text = "1000";//空载电流
|
|
|
+ textBox_NC_Current.Text = "800";//空载电流
|
|
|
textBox_GasSpeedTh.Text = "1000";//指拨转速
|
|
|
textBox_Zero_Min.Text = "200";//零偏下限
|
|
|
textBox_Zero_Max.Text = "1800";//零偏上限
|
|
@@ -893,7 +893,7 @@ namespace MOTINOVA_Motor_Factory_Set
|
|
|
textBox_RatePower.Text = "250";//额定功率
|
|
|
textBox_RateSpeed.Text = "1200";//额定转速
|
|
|
textBox_Rate_Vol.Text = "36";//额定电压
|
|
|
- textBox_NC_Current.Text = "1000";//空载电流
|
|
|
+ textBox_NC_Current.Text = "800";//空载电流
|
|
|
textBox_GasSpeedTh.Text = "1000";//指拨转速
|
|
|
textBox_Zero_Min.Text = "200";//零偏下限
|
|
|
textBox_Zero_Max.Text = "1800";//零偏上限
|
|
@@ -909,7 +909,7 @@ namespace MOTINOVA_Motor_Factory_Set
|
|
|
textBox_RatePower.Text = "250";//额定功率
|
|
|
textBox_RateSpeed.Text = "1200";//额定转速
|
|
|
textBox_Rate_Vol.Text = "36";//额定电压
|
|
|
- textBox_NC_Current.Text = "1000";//空载电流
|
|
|
+ textBox_NC_Current.Text = "800";//空载电流
|
|
|
textBox_GasSpeedTh.Text = "1000";//指拨转速
|
|
|
textBox_Zero_Min.Text = "200";//零偏下限
|
|
|
textBox_Zero_Max.Text = "1800";//零偏上限
|
|
@@ -926,13 +926,13 @@ namespace MOTINOVA_Motor_Factory_Set
|
|
|
textBox_RateSpeed.Text = "1600";//额定转速
|
|
|
textBox_Rate_Vol.Text = "36";//额定电压
|
|
|
textBox_NC_Current.Text = "1000";//空载电流
|
|
|
- textBox_GasSpeedTh.Text = "1000";//指拨转速
|
|
|
+ textBox_GasSpeedTh.Text = "1400";//指拨转速
|
|
|
textBox_Zero_Min.Text = "100";//零偏下限
|
|
|
textBox_Zero_Max.Text = "2000";//零偏上限
|
|
|
textBox_K_Min.Text = "0.25";//传感器标定值下限
|
|
|
textBox_K_Max.Text = "1.20";//传感器标定值下限
|
|
|
- textBox_Start_Min.Text = "350";//启动值下限
|
|
|
- textBox_Start_Max.Text = "750";//启动值上限
|
|
|
+ textBox_Start_Min.Text = "280";//启动值下限
|
|
|
+ textBox_Start_Max.Text = "500";//启动值上限
|
|
|
}
|
|
|
else if (textBox_Model.Text.Contains("PS"))
|
|
|
{
|
|
@@ -942,13 +942,13 @@ namespace MOTINOVA_Motor_Factory_Set
|
|
|
textBox_RateSpeed.Text = "1800";//额定转速
|
|
|
textBox_Rate_Vol.Text = "48";//额定电压
|
|
|
textBox_NC_Current.Text = "1000";//空载电流
|
|
|
- textBox_GasSpeedTh.Text = "1000";//指拨转速
|
|
|
+ textBox_GasSpeedTh.Text = "1600";//指拨转速
|
|
|
textBox_Zero_Min.Text = "100";//零偏下限
|
|
|
textBox_Zero_Max.Text = "2000";//零偏上限
|
|
|
textBox_K_Min.Text = "0.25";//传感器标定值下限
|
|
|
textBox_K_Max.Text = "1.20";//传感器标定值下限
|
|
|
- textBox_Start_Min.Text = "350";//启动值下限
|
|
|
- textBox_Start_Max.Text = "750";//启动值上限
|
|
|
+ textBox_Start_Min.Text = "280";//启动值下限
|
|
|
+ textBox_Start_Max.Text = "500";//启动值上限
|
|
|
}
|
|
|
else
|
|
|
{
|