diff --git a/app/HGProductionTool/ProductionTool_zh_CN.qm b/app/HGProductionTool/ProductionTool_zh_CN.qm
index d4a8e6c..e604023 100644
Binary files a/app/HGProductionTool/ProductionTool_zh_CN.qm and b/app/HGProductionTool/ProductionTool_zh_CN.qm differ
diff --git a/app/HGProductionTool/ProductionTool_zh_CN.ts b/app/HGProductionTool/ProductionTool_zh_CN.ts
index 3f8b438..24c4bde 100644
--- a/app/HGProductionTool/ProductionTool_zh_CN.ts
+++ b/app/HGProductionTool/ProductionTool_zh_CN.ts
@@ -764,28 +764,28 @@
下一步
-
+
设备已连接
-
+
设备未连接
-
+
设备型号:
-
+
序列号:
-
-
+
+
设备连接状态:
@@ -798,23 +798,23 @@
休眠时间:
-
+
加载上一次上传的图片
-
+
设备已断开
-
+
提示
-
-
+
+
畸变修正值:
@@ -827,47 +827,85 @@
取消
-
+
目标配置: 速度模式:
-
+
休眠时间:
-
+
+
+ 请验证设备配置:
+
+
+
+
+ vid:%1
+
+
+
+
+
+ pid:%1
+
+
+
+
+
+ 休眠时间:%1分钟
+
+
+
+
+
+ 速度模式:%1PPM
+
+
+
+
+
+ 设备序列号:%1
+
+
+
序号
-
+
测试项
-
+
测试状态
-
+
未测试
-
+
不通过
-
+
不支持
-
+
通过
@@ -893,29 +931,29 @@
Pid:
-
-
+
+
设备滚轴张数:
-
-
+
+
标准圆:宽 * 高:
-
+
分钟
-
+
VID:
-
+
PID:
@@ -1131,19 +1169,19 @@
QObject
-
+
success
成功:
-
-
+
+
失败:
-
+
没有找到该测试项
diff --git a/app/HGProductionTool/form_maininterface.cpp b/app/HGProductionTool/form_maininterface.cpp
index f89b272..4070123 100644
--- a/app/HGProductionTool/form_maininterface.cpp
+++ b/app/HGProductionTool/form_maininterface.cpp
@@ -53,6 +53,7 @@ Form_mainInterface::Form_mainInterface(class MainWindow *mainwnd, Dialog_logIn::
connect(this, SIGNAL(testResultImg(void*)), this, SLOT(on_testResultImg(void*)), Qt::QueuedConnection);
connect(this, &Form_mainInterface::testDistortion, this, &Form_mainInterface::on_testDistortion);
connect(this, SIGNAL(testCorrectInfo(QString)), this, SLOT(on_testCorrectInfo(QString)), Qt::QueuedConnection);
+ connect(this, SIGNAL(testGetDevCfgInfo(int,int,int,int,QString)), this, SLOT(on_testGetDevCfgInfo(int,int,int,int,QString)), Qt::QueuedConnection);
QString str;
if (m_handle)
@@ -236,6 +237,22 @@ void Form_mainInterface::on_testCorrectInfo(QString info)
m_textTips->addContent(info);
}
+void Form_mainInterface::on_testGetDevCfgInfo(int vid, int pid, int sleepTime, int speedMode, QString devSn)
+{
+ char buf[10];
+ sprintf(buf, "%x", vid);
+ char buf2[10];
+ sprintf(buf2, "%x", pid);
+ QString str = (tr("please verify the configuration of the device:") + "\n\t");
+ str.append(tr("vid:%1\n\t").arg(QString::fromStdString(buf)));
+ str.append(tr("pid:%1\n\t").arg(QString::fromStdString(buf2)));
+ str.append(tr("sleep time:%1minute\n\t").arg(QString::number(sleepTime)));
+ str.append(tr("speed mode:%1PPM\n\t").arg(QString::number(speedMode)));
+ str.append(tr("device serial number:%1").arg(devSn));
+
+ m_textTips->setViewContent(str);
+}
+
void Form_mainInterface::on_viewerDblClick()
{
if (m_multiIndex != -1)
@@ -672,7 +689,7 @@ void Form_mainInterface::on_pbtn_start_clicked()
if (buf != nullptr && dpi > 0)
func_test_go(name.toStdWString().c_str(), (const wchar_t*)buf, m_hg);
else
- func_test_go(HGPDTTOOLDB_NAME_GET_DEVICE_CONFIG, L"null", m_hg);
+ func_test_go(name.toStdWString().c_str(), L"null", m_hg);
}
if (name == "CLEAR_ROLLER_COUNT")
diff --git a/app/HGProductionTool/form_maininterface.h b/app/HGProductionTool/form_maininterface.h
index 0be5e50..efa519d 100644
--- a/app/HGProductionTool/form_maininterface.h
+++ b/app/HGProductionTool/form_maininterface.h
@@ -40,12 +40,14 @@ signals:
void testResultImg(void* img);
void testDistortion(SANE_DISTORTION_VAL data);
void testCorrectInfo(QString info);
+ void testGetDevCfgInfo(int vid, int pid, int sleepTime, int speedMode, QString devSn);
private slots:
void on_testResult(QString text);
void on_testResultImg(void* img);
void on_testDistortion(SANE_DISTORTION_VAL data);
void on_testCorrectInfo(QString info);
+ void on_testGetDevCfgInfo(int vid, int pid, int sleepTime, int speedMode, QString devSn);
void on_viewerDblClick();
diff --git a/app/HGProductionTool/hgscanner.cpp b/app/HGProductionTool/hgscanner.cpp
index 0958900..e7b4ab3 100644
--- a/app/HGProductionTool/hgscanner.cpp
+++ b/app/HGProductionTool/hgscanner.cpp
@@ -12,6 +12,9 @@ hgscanner::hgscanner(Form_mainInterface *form, Form_BurnMode *burnMode, Dialog_I
, m_inputSnDlg(inputSnDlg)
, devHandle_(h)
, m_distortValue(0.0)
+ , m_sleepTime(0)
+ , m_speedMode(0)
+ , m_devSn("")
{
cb_ = nullptr;
}
@@ -42,21 +45,22 @@ void hgscanner::test_callback(const wchar_t* name, test_event ev, void* data, si
{
if (ev == TEST_EVEB_GET_DEVICE_CONFIG_VIDPID)
{
-
int vidpid = *(int*)data;
+ m_vidPid.Value = vidpid;
}
else if (ev == TEST_EVEB_GET_DEVICE_CONFIG_SP)
{
- int sp = *(int*)data;
+ m_speedMode = *(int*)data;
}
else if (ev == TEST_EVEB_GET_DEVICE_CONFIG_SLEEPTIME)
{
- int st = *(int*)data;
+ m_sleepTime = *(int*)data;
}
else if (ev == TEST_EVEB_GET_DEVICE_CONFIG_SN)
{
- QString info = QString::fromStdWString((const wchar_t*)data);
+ m_devSn = QString::fromStdWString((const wchar_t*)data);
}
+
if (ev == TEST_EVENT_TIPS)
{
@@ -102,6 +106,14 @@ void hgscanner::test_callback(const wchar_t* name, test_event ev, void* data, si
else if (ev == TEST_EVENT_RESULT)
{
QString info;
+ if (wcscmp(name, HGPDTTOOLDB_NAME_GET_DEVICE_CONFIG) == 0)
+ {
+ if (m_interface != nullptr)
+ {
+ emit m_interface->testGetDevCfgInfo((int)m_vidPid.VID, (int)m_vidPid.PID, m_sleepTime, m_speedMode, m_devSn);
+ }
+ }
+
if (data != nullptr)
{
if (flag)
@@ -109,6 +121,7 @@ void hgscanner::test_callback(const wchar_t* name, test_event ev, void* data, si
else
info = QObject::tr("failed: ") + QString::fromStdWString((const wchar_t*)data);
}
+
if (m_interface != nullptr)
{
emit m_interface->testResult(info);
@@ -117,6 +130,7 @@ void hgscanner::test_callback(const wchar_t* name, test_event ev, void* data, si
{
emit m_burnMode->testResult(flag);
}
+
}
else if (ev == TEST_EVENT_DISTORTION_VAL)
{
diff --git a/app/HGProductionTool/hgscanner.h b/app/HGProductionTool/hgscanner.h
index 470fbfb..8e0bf21 100644
--- a/app/HGProductionTool/hgscanner.h
+++ b/app/HGProductionTool/hgscanner.h
@@ -2,6 +2,7 @@
#include "sane/sane_ex.h"
#include "ui_helper.h"
#include "test_base.h"
+#include
class Form_mainInterface;
class Form_BurnMode;
@@ -20,12 +21,29 @@ public:
sane_callback cb_;
void setDistortValue(double value);
+
+private:
+ union VIDPID
+ {
+ struct
+ {
+ unsigned short VID;
+ unsigned short PID;
+ };
+ unsigned int Value;
+ };
+
private:
class Form_mainInterface *m_interface;
class Form_BurnMode *m_burnMode;
class Dialog_InputSerialNum *m_inputSnDlg;
SANE_Handle devHandle_;
+private:
double m_distortValue;
+ VIDPID m_vidPid;
+ int m_sleepTime;
+ int m_speedMode;
+ QString m_devSn;
};