diff --git a/app/HGPdtJsonTool/HGPdtJsonTool_zh_CN.qm b/app/HGPdtJsonTool/HGPdtJsonTool_zh_CN.qm
index a135cd2..5ea67df 100644
Binary files a/app/HGPdtJsonTool/HGPdtJsonTool_zh_CN.qm and b/app/HGPdtJsonTool/HGPdtJsonTool_zh_CN.qm differ
diff --git a/app/HGPdtJsonTool/HGPdtJsonTool_zh_CN.ts b/app/HGPdtJsonTool/HGPdtJsonTool_zh_CN.ts
index 09f884a..e9c3602 100644
--- a/app/HGPdtJsonTool/HGPdtJsonTool_zh_CN.ts
+++ b/app/HGPdtJsonTool/HGPdtJsonTool_zh_CN.ts
@@ -147,6 +147,11 @@
是否锁定:
+
+
+
+ 电机板版本号:
+
Test Id:
diff --git a/app/HGPdtJsonTool/analysisjson.cpp b/app/HGPdtJsonTool/analysisjson.cpp
index 2c4b0cc..b68ce43 100644
--- a/app/HGPdtJsonTool/analysisjson.cpp
+++ b/app/HGPdtJsonTool/analysisjson.cpp
@@ -58,7 +58,8 @@ AnalysisJson::json_global AnalysisJson::GetGlobal()
obj["disk-size"].toInt(),
obj["lock-device"].toBool(),
obj["device-model"].toString(),
- obj["firmware-version"].toString()
+ obj["firmware-version"].toString(),
+ obj["motor-version"].toString()
};
}
diff --git a/app/HGPdtJsonTool/analysisjson.h b/app/HGPdtJsonTool/analysisjson.h
index e785608..991523e 100644
--- a/app/HGPdtJsonTool/analysisjson.h
+++ b/app/HGPdtJsonTool/analysisjson.h
@@ -29,6 +29,7 @@ public:
bool lock_device;
QString device_model;
QString firmware_version;
+ QString motor_version;
};
AnalysisJson() = delete ;
diff --git a/app/HGPdtJsonTool/mainwindow.cpp b/app/HGPdtJsonTool/mainwindow.cpp
index 97aef4a..d2f5833 100644
--- a/app/HGPdtJsonTool/mainwindow.cpp
+++ b/app/HGPdtJsonTool/mainwindow.cpp
@@ -355,6 +355,7 @@ void MainWindow::on_pushButton_generate_clicked()
deviceInfo.deviceType = ui->comboBox_deviceType->currentText();
deviceInfo.deviceModel = ui->lineEdit_deviceModel->text();
deviceInfo.fwVersion = ui->lineEdit_fwVersion->text();
+ deviceInfo.motorVersion = ui->lineEdit_motorVersion->text();
deviceInfo.vid = ui->lineEdit_vid->text();
deviceInfo.pid = ui->lineEdit_pid->text();
deviceInfo.sleepTime = ui->comboBox_sleepTime->currentText();
@@ -381,6 +382,8 @@ void MainWindow::on_pushButton_generate_clicked()
globalObject.insert("device-model", ui->lineEdit_deviceModel->text());
if (!ui->lineEdit_fwVersion->text().isEmpty())
globalObject.insert("firmware-version", ui->lineEdit_fwVersion->text());
+ if (!ui->lineEdit_motorVersion->text().isEmpty())
+ globalObject.insert("motor-version", ui->lineEdit_motorVersion->text());
QJsonObject json;
json.insert("global", QJsonValue(globalObject));
diff --git a/app/HGPdtJsonTool/mainwindow.h b/app/HGPdtJsonTool/mainwindow.h
index a5a66d7..62ab631 100644
--- a/app/HGPdtJsonTool/mainwindow.h
+++ b/app/HGPdtJsonTool/mainwindow.h
@@ -31,6 +31,7 @@ struct DeviceInfo
QString deviceType;
QString deviceModel;
QString fwVersion;
+ QString motorVersion;
QString vid;
QString pid;
QString sleepTime;
diff --git a/app/HGPdtJsonTool/mainwindow.ui b/app/HGPdtJsonTool/mainwindow.ui
index 0926f6a..5f417e8 100644
--- a/app/HGPdtJsonTool/mainwindow.ui
+++ b/app/HGPdtJsonTool/mainwindow.ui
@@ -6,8 +6,8 @@
0
0
- 1008
- 753
+ 1013
+ 738
@@ -17,9 +17,9 @@
- 740
- 40
- 161
+ 840
+ 20
+ 131
20
@@ -29,7 +29,7 @@
130
20
- 161
+ 131
22
@@ -37,8 +37,8 @@
- 680
- 40
+ 780
+ 20
41
21
@@ -50,9 +50,9 @@
- 440
+ 380
90
- 161
+ 131
20
@@ -73,9 +73,9 @@
- 740
- 10
- 161
+ 610
+ 20
+ 131
20
@@ -83,7 +83,7 @@
- 330
+ 270
90
101
21
@@ -96,8 +96,8 @@
- 680
- 10
+ 550
+ 20
41
21
@@ -109,8 +109,8 @@
- 430
- 640
+ 450
+ 620
131
51
@@ -124,7 +124,7 @@
130
90
- 161
+ 131
20
@@ -145,8 +145,8 @@
- 650
- 110
+ 750
+ 90
91
20
@@ -158,9 +158,9 @@
- 740
- 80
- 161
+ 610
+ 90
+ 131
20
@@ -168,7 +168,7 @@
- 30
+ 280
160
101
21
@@ -181,9 +181,9 @@
- 130
+ 380
160
- 161
+ 131
22
@@ -191,7 +191,7 @@
- 360
+ 530
160
71
21
@@ -204,9 +204,9 @@
- 740
+ 840
160
- 161
+ 131
22
@@ -214,8 +214,8 @@
- 650
- 80
+ 520
+ 90
91
20
@@ -227,9 +227,9 @@
- 740
- 110
- 161
+ 840
+ 90
+ 131
20
@@ -237,9 +237,9 @@
- 440
+ 610
160
- 161
+ 131
22
@@ -247,7 +247,7 @@
- 650
+ 750
160
71
21
@@ -261,7 +261,7 @@
20
- 280
+ 260
621
291
@@ -270,9 +270,9 @@
- 440
+ 380
20
- 161
+ 131
22
@@ -280,7 +280,7 @@
- 360
+ 300
20
71
20
@@ -294,7 +294,7 @@
20
- 230
+ 220
971
16
@@ -307,7 +307,7 @@
20
- 590
+ 580
77
16
@@ -320,19 +320,42 @@
650
- 280
+ 260
341
291
+
+
+
+ 40
+ 160
+ 91
+ 16
+
+
+
+ Motor version:
+
+
+
+
+
+ 130
+ 160
+ 131
+ 20
+
+
+
-
-
-
-
+
+
+
+
提示
-
+
速度模式
-
+
失败!
-
+
成功!
-
+
检测到固件版本不一致,请烧录正确的固件并重新检查
-
+
+
+ 检测到电机版本不一致,请更换正确的电机并重新检查
+
+
+
休眠时间
-
+
Vid和Pid
@@ -176,32 +181,32 @@
检测到配置%1不一致,已重新配置,请再次检查
-
+
配置一致!
-
+
设备已丢失
-
+
序列号为空
-
+
序列号不合法
-
+
该设备正在进行测试
-
+
设置序列号失败
@@ -211,7 +216,7 @@
设备名: %1
-
+
Target Configration:
@@ -219,16 +224,16 @@
-
-
-
+
+
+
Speep mode: %1PPM
速度模式: %1PPM
-
+
Pass
@@ -242,9 +247,9 @@
-
-
-
+
+
+
Sleep time: %1minute
@@ -252,7 +257,7 @@
-
+
Vid: %1 Pid: %2
@@ -260,45 +265,51 @@
-
-
-
+
+
+
设备型号: %1
-
-
+
+
固件版本:%1
-
-
+
+
+
+ 电机板版本号:%1
+
+
+
+
Vid: %1
Pid: %2
-
+
当前设备配置:
-
+
Fail
-
-
-
+
+
+
设置序列号: %1
-
+
设备型号
@@ -311,14 +322,14 @@ Pid: %2
检测到%1不一致,请烧录正确的固件并重新检查
-
-
+
+
检测到当前设备的vid-pid和设备对象不一致.
-
-
+
+
请重启设备刷新.
@@ -339,24 +350,24 @@ Pid: %2
测试结果:成功!
-
-
-
+
+
+
检测到配置 %1不一致,请重新配置后再次检查
-
+
检测到配置 %1不一致,请重启后再次检查
-
+
将目标配置设置到设备
-
+
测试内容:
@@ -366,20 +377,20 @@ Pid: %2
-
-
-
+
+
+
休眠时间: 不休眠
-
-
+
+
测试员: %1, 测试项: %2
-
+
设置序列号成功
@@ -564,12 +575,12 @@ Pid: %2
英文
-
+
提示
-
+
请输入有效内容
@@ -1436,7 +1447,7 @@ Pid: %2
-
+
不休眠
@@ -1463,16 +1474,16 @@ Pid: %2
设备序列号: %1, 测试项: %2, 测试结果: 通过!
-
-
+
+
设备历史扫描张数:
-
-
+
+
提示
@@ -1504,22 +1515,22 @@ Pid: %2
测试员: %1, 测试项: %2, 测试结果: 通过!
-
+
无纸
-
+
设备处于休眠模式
-
+
设备处于计数模式
-
+
其他错误
@@ -1621,8 +1632,8 @@ Pid: %2
Pid:
-
-
+
+
设备滚轴张数:
@@ -1674,7 +1685,7 @@ Pid: %2
实际硬盘容量:%1
-
+
分钟
@@ -1930,19 +1941,19 @@ Pid: %2
QObject
-
+
success
成功:
-
-
+
+
失败:
-
+
没有找到该测试项
diff --git a/app/HGProductionTool/analysisjson.cpp b/app/HGProductionTool/analysisjson.cpp
index 48dc08f..2277e57 100644
--- a/app/HGProductionTool/analysisjson.cpp
+++ b/app/HGProductionTool/analysisjson.cpp
@@ -59,7 +59,8 @@ AnalysisJson::json_global AnalysisJson::GetGlobal()
obj["device-model"].toString(),
obj["cpu-size"].toDouble(),
obj["disk-size"].toDouble(),
- obj["firmware-version"].toString()};
+ obj["firmware-version"].toString(),
+ obj["motor-version"].toString()};
}
diff --git a/app/HGProductionTool/analysisjson.h b/app/HGProductionTool/analysisjson.h
index 0eeb3a0..2e965fc 100644
--- a/app/HGProductionTool/analysisjson.h
+++ b/app/HGProductionTool/analysisjson.h
@@ -29,6 +29,7 @@ public:
double cpu_size;
double disk_size;
QString firmware_version;
+ QString motor_version;
};
AnalysisJson() = delete ;
diff --git a/app/HGProductionTool/dialog_inputserialnum.cpp b/app/HGProductionTool/dialog_inputserialnum.cpp
index b70ffa1..99b9693 100644
--- a/app/HGProductionTool/dialog_inputserialnum.cpp
+++ b/app/HGProductionTool/dialog_inputserialnum.cpp
@@ -292,6 +292,20 @@ QString Dialog_InputSerialNum::getDeviceFwVersion()
return QString::fromStdString(firmwareVersion).left(10);
}
+QString Dialog_InputSerialNum::getDeviceMotorVersion()
+{
+ std::string motorVersion;
+ unsigned int motorVersionLen = 0;
+
+ SANE_Status ret = sane_io_control(m_handle, IO_CTRL_CODE_GET_MOTOR_VERSION, &motorVersion[0], &motorVersionLen);
+ if(SANE_STATUS_NO_MEM == ret)
+ {
+ motorVersion.resize(motorVersionLen);
+ ret = sane_io_control(m_handle, IO_CTRL_CODE_GET_MOTOR_VERSION, &motorVersion[0], &motorVersionLen);
+ }
+ return QString::fromStdString(motorVersion.c_str());
+}
+
void Dialog_InputSerialNum::updateTargetCfg()
{
ui->textBrowser_target->clear();
@@ -305,6 +319,7 @@ void Dialog_InputSerialNum::updateTargetCfg()
int pid_to = jsonGlobal.pid_to;
QString devideModel = jsonGlobal.device_model;
QString fwVersion = jsonGlobal.firmware_version;
+ QString motorVersion = jsonGlobal.motor_version;
char buf[10];
sprintf(buf, "%x", vid_to);
@@ -321,6 +336,9 @@ void Dialog_InputSerialNum::updateTargetCfg()
if (!fwVersion.isEmpty())
content.append(tr("Firmware version: %1").arg(fwVersion) + "\n");
+ if (!motorVersion.isEmpty())
+ content.append(tr("Motor version: %1").arg(motorVersion) + "\n");
+
content.append(tr("Speep mode: %1PPM").arg(QString::number(speedMode)) + "\n");
content.append((sleepTime > 0 ? tr("Sleep time: %1minute").arg(QString::number(sleepTime)) : tr("Sleep time: Not sleeping")) + "\n");
content.append(tr("Vid: %1\nPid: %2").arg(QString::fromStdString(buf)).arg(QString::fromStdString(buf2)) + "\n");
@@ -354,6 +372,12 @@ void Dialog_InputSerialNum::updateCurDeviceCfg()
fwVersion = getDeviceFwVersion();
}
+ QString motorVersion("");
+ if (!jsonGlobal.motor_version.isEmpty())
+ {
+ motorVersion = getDeviceMotorVersion();
+ }
+
char buf[10];
sprintf(buf, "%x", vid_to);
@@ -369,6 +393,9 @@ void Dialog_InputSerialNum::updateCurDeviceCfg()
if (!fwVersion.isEmpty())
content.append(tr("Firmware version: %1").arg(fwVersion) + "\n");
+ if (!motorVersion.isEmpty())
+ content.append(tr("Motor version: %1").arg(motorVersion) + "\n");
+
content.append(tr("Speep mode: %1PPM").arg(QString::number(speedMode)) + "\n");
content.append(sleepTime > 0 ? tr("Sleep time: %1minute").arg(QString::number(sleepTime)) + "\n" : tr("Sleep time: Not sleeping") + "\n");
content.append(tr("Vid: %1\nPid: %2").arg(QString::fromStdString(buf)).arg(QString::fromStdString(buf2)) + "\n");
@@ -483,6 +510,7 @@ void Dialog_InputSerialNum::on_pbtn_checkConfig_clicked()
int pid_to = jsonGlobal.pid_to;
QString deviceModel_to = jsonGlobal.device_model;
QString firmwareVersion_to = jsonGlobal.firmware_version;
+ QString motorVersion_to = jsonGlobal.motor_version;
int speedMode = getSpeedMode();
int sleepTime = getSleepTime();
@@ -519,6 +547,18 @@ void Dialog_InputSerialNum::on_pbtn_checkConfig_clicked()
}
}
+ if (!motorVersion_to.isEmpty())
+ {
+ QString motorVersion = getDeviceMotorVersion();
+ if (motorVersion_to != motorVersion)
+ {
+ right = false;
+
+ QString info = tr("Inconsistent motor version detected, please exchange the correct motor, and check again");
+ addInteractInfo(info, false);
+ }
+ }
+
if (speedMode_to != speedMode)
{
item.append(tr("Speed mode"));
diff --git a/app/HGProductionTool/dialog_inputserialnum.h b/app/HGProductionTool/dialog_inputserialnum.h
index bcf93aa..188c7f4 100644
--- a/app/HGProductionTool/dialog_inputserialnum.h
+++ b/app/HGProductionTool/dialog_inputserialnum.h
@@ -36,6 +36,7 @@ public:
int getDevPid();
QString getDeviceModel();
QString getDeviceFwVersion();
+ QString getDeviceMotorVersion();
private:
void updateTargetCfg();
diff --git a/code/base/test_base.cpp b/code/base/test_base.cpp
index 47edd00..ad9f76f 100644
--- a/code/base/test_base.cpp
+++ b/code/base/test_base.cpp
@@ -507,6 +507,7 @@ public:
{
if ( wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_CIS_ORIGINAL_IMAGE) == 0
||wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_IMAGE_COLOR_QUALITY) == 0
+ || wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_SKEW_DETECTION) == 0
|| wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_IMAGE_GRAY_QUALITY) == 0
||wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_GET_DISTORTION_VAL) == 0
||wcscmp(set_test_name_.c_str(), HGPDTTOOLDB_NAME_CONFIRM_DISTORTION_VAL) == 0
@@ -835,7 +836,7 @@ public:
if (ret != SCANNER_ERR_OK)
return ret;
- ret = helper_->io_control(IO_CTRL_CODE_TEST_SINGLE, NULL, NULL);
+ ret = helper_->io_control(IO_CTRL_CODE_GET_IMAGE, NULL, NULL);
return ret;
}
/* 分纸电机检测 */