diff --git a/app/HGProductionTool/ProductionTool_zh_CN.qm b/app/HGProductionTool/ProductionTool_zh_CN.qm
index e4436ec..7c33111 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 ca61f36..154911b 100644
--- a/app/HGProductionTool/ProductionTool_zh_CN.ts
+++ b/app/HGProductionTool/ProductionTool_zh_CN.ts
@@ -614,17 +614,17 @@
关闭设备
-
+
序号
-
+
选择
-
+
设备
@@ -633,14 +633,14 @@
序列号
-
-
+
+
提示
-
-
+
+
请至少勾选一台设备
@@ -741,28 +741,28 @@
下一步
-
+
设备已连接
-
+
设备未连接
-
+
设备型号:
-
+
序列号:
-
-
+
+
设备连接状态:
@@ -775,23 +775,22 @@
休眠时间:
-
+
加载上一次上传的图片
-
+
设备已断开
-
-
+
提示
-
+
畸变修正值:
@@ -804,74 +803,74 @@
取消
-
+
目标配置: 速度模式:
-
+
休眠时间:
-
+
序号
-
+
测试项
-
+
测试状态
-
+
未测试
-
+
不通过
-
+
不支持
-
+
通过
-
+
+
标准圆宽高:
-
+
分钟
-
+
VID:
-
+
PID:
-
- 无图
+ 无图
@@ -960,7 +959,6 @@
-
@@ -1000,11 +998,16 @@
测试中,请勿关闭!
+
+
+
+ 警告
+
Are you sure to connect the new device
- 检测到设备,请先确认是否已经复位
+ 检测到设备,请先确认是否已经复位,否则有可能导致获取序列号失败!
diff --git a/app/HGProductionTool/form_burnmode.cpp b/app/HGProductionTool/form_burnmode.cpp
index 98be149..e6502aa 100644
--- a/app/HGProductionTool/form_burnmode.cpp
+++ b/app/HGProductionTool/form_burnmode.cpp
@@ -45,12 +45,6 @@ void Form_BurnMode::addDevice(DeviceManager *devManager)
item->setData(Qt::UserRole, var);
updatetablewidget();
-// for(int i = 0; i < ui->tableWidget->rowCount(); i++)
-// {
-// QTableWidgetItem *item = ui->tableWidget->item(i, 3);
-// if (item != nullptr)
-// item->setFlags(Qt::ItemIsEditable | Qt::ItemIsEnabled);
-// }
m_curIndex++;
}
@@ -209,16 +203,12 @@ void Form_BurnMode::on_pbtn_burn_clicked()
// }
//}
-DeviceManager::DeviceManager(class MainWindow *mainwnd, HGPdtToolDbUserMgr pdtToolDbuserMgr, class Form_BurnMode *burnMode,
- SANE_Handle handle, const QString & devName, const QString & sn, const QString &devType)
+DeviceManager::DeviceManager(class MainWindow *mainwnd, class Form_BurnMode *burnMode, SANE_Handle handle, const QString & devName)
{
m_mainwnd = mainwnd;
- m_pdtToolDbuserMgr = pdtToolDbuserMgr;
m_burnMode = burnMode;
m_handle = handle;
m_devName = devName;
- m_sn = sn;
- m_devType = devType;
m_hg = new hgscanner(nullptr, m_burnMode, nullptr, m_handle);
}
@@ -236,11 +226,6 @@ QString DeviceManager::getDevName()
return m_devName;
}
-QString DeviceManager::getSn()
-{
- return m_sn;
-}
-
void DeviceManager::setBurnMode()
{
const wchar_t *p = L"1";
@@ -249,65 +234,65 @@ void DeviceManager::setBurnMode()
}
-void DeviceManager::setSn(QString sn)
-{
- LPWRITECFG p = new WRITECFG;
+//void DeviceManager::setSn(QString sn)
+//{
+// LPWRITECFG p = new WRITECFG;
- std::wstring sn2 = sn.toStdWString();
- p->cat = WRITE_CAT_SERIALNUM;
- p->val = (void*)sn2.c_str();
- m_mainwnd->addTestingRef();
- func_test_go(WRITE_CFG_NAME, (const wchar_t*)p, m_hg);
+// std::wstring sn2 = sn.toStdWString();
+// p->cat = WRITE_CAT_SERIALNUM;
+// p->val = (void*)sn2.c_str();
+// m_mainwnd->addTestingRef();
+// func_test_go(WRITE_CFG_NAME, (const wchar_t*)p, m_hg);
- setGlobalCfg();
+// setGlobalCfg();
- delete p;
-}
+// delete p;
+//}
-QString DeviceManager::getUpdatedSn()
-{
- return m_mainwnd->getDevSn(m_handle);
-}
+//QString DeviceManager::getUpdatedSn()
+//{
+// return m_mainwnd->getDevSn(m_handle);
+//}
-void DeviceManager::setGlobalCfg()
-{
- HGChar cfgPath[512] = {0};
- HGBase_GetConfigPath(cfgPath, 512);
- HGBase_CreateDir(cfgPath);
- strcat(cfgPath, m_devType.toStdString().c_str());
- strcat(cfgPath, ".json");
+//void DeviceManager::setGlobalCfg()
+//{
+// HGChar cfgPath[512] = {0};
+// HGBase_GetConfigPath(cfgPath, 512);
+// HGBase_CreateDir(cfgPath);
+// strcat(cfgPath, m_devType.toStdString().c_str());
+// strcat(cfgPath, ".json");
- HGPdtToolDb_DownloadFile(m_pdtToolDbuserMgr, m_devType.toStdString().c_str(), cfgPath);
+// HGPdtToolDb_DownloadFile(m_pdtToolDbuserMgr, m_devType.toStdString().c_str(), cfgPath);
- AnalysisJson analysisJson(QString::fromStdString(cfgPath));
+// AnalysisJson analysisJson(QString::fromStdString(cfgPath));
- assert(nullptr != m_hg);
- AnalysisJson::json_global jsonGlobal = analysisJson.GetGlobal();
- LPWRITECFG lp = new WRITECFG;
+// assert(nullptr != m_hg);
+// AnalysisJson::json_global jsonGlobal = analysisJson.GetGlobal();
+// LPWRITECFG lp = new WRITECFG;
- VIDPID vidpid;
- vidpid.VID = jsonGlobal.vid_to;
- vidpid.PID = jsonGlobal.pid_to;
- int vidpidValue = vidpid.Value;
- lp->cat = WRITE_CAT_VID_PID;
- lp->val = (void*)&vidpidValue;
- m_mainwnd->addTestingRef();
- func_test_go(WRITE_CFG_NAME, (const wchar_t*)lp, m_hg);
+// VIDPID vidpid;
+// vidpid.VID = jsonGlobal.vid_to;
+// vidpid.PID = jsonGlobal.pid_to;
+// int vidpidValue = vidpid.Value;
+// lp->cat = WRITE_CAT_VID_PID;
+// lp->val = (void*)&vidpidValue;
+// m_mainwnd->addTestingRef();
+// func_test_go(WRITE_CFG_NAME, (const wchar_t*)lp, m_hg);
- int speedMode = jsonGlobal.speed_mode ;
- lp->cat = WRITE_CAT_SPEED;
- lp->val = (void*)&speedMode;
- m_mainwnd->addTestingRef();
- func_test_go(WRITE_CFG_NAME, (const wchar_t*)lp, m_hg);
+// int speedMode = jsonGlobal.speed_mode ;
+// lp->cat = WRITE_CAT_SPEED;
+// lp->val = (void*)&speedMode;
+// m_mainwnd->addTestingRef();
+// func_test_go(WRITE_CFG_NAME, (const wchar_t*)lp, m_hg);
- int sleepTime = jsonGlobal.sleep_time;
- lp->cat = WRITE_CAT_SLEEP;
- lp->val = (void*)&sleepTime;
- m_mainwnd->addTestingRef();
- func_test_go(WRITE_CFG_NAME, (const wchar_t*)lp, m_hg);
+// int sleepTime = jsonGlobal.sleep_time;
+// lp->cat = WRITE_CAT_SLEEP;
+// lp->val = (void*)&sleepTime;
+// m_mainwnd->addTestingRef();
+// func_test_go(WRITE_CFG_NAME, (const wchar_t*)lp, m_hg);
- delete lp;
-}
+// delete lp;
+//}
void Form_BurnMode::on_tableWidget_itemDoubleClicked(QTableWidgetItem *item)
{
diff --git a/app/HGProductionTool/form_burnmode.h b/app/HGProductionTool/form_burnmode.h
index 6a6fb57..2fc5f61 100644
--- a/app/HGProductionTool/form_burnmode.h
+++ b/app/HGProductionTool/form_burnmode.h
@@ -14,17 +14,15 @@ class Form_BurnMode;
class DeviceManager
{
public:
- DeviceManager(class MainWindow *mainwnd, HGPdtToolDbUserMgr pdtToolDbuserMgr, class Form_BurnMode *burnMode,
- SANE_Handle handle, const QString &devName, const QString &sn, const QString &devType);
+ DeviceManager(class MainWindow *mainwnd, class Form_BurnMode *burnMode, SANE_Handle handle, const QString &devName);
~DeviceManager();
QString getDevName();
- QString getSn();
void setBurnMode();
- void setSn(QString sn);
- QString getUpdatedSn();
+// void setSn(QString sn);
+// QString getUpdatedSn();
SANE_Handle m_handle;
- void setGlobalCfg();
+// void setGlobalCfg();
private:
union VIDPID
@@ -39,11 +37,8 @@ private:
private:
class MainWindow *m_mainwnd;
- HGPdtToolDbUserMgr m_pdtToolDbuserMgr;
class Form_BurnMode *m_burnMode;
QString m_devName;
- QString m_sn;
- QString m_devType;
hgscanner *m_hg;
};
diff --git a/app/HGProductionTool/mainwindow.cpp b/app/HGProductionTool/mainwindow.cpp
index b9f88ea..f4cbb7f 100644
--- a/app/HGProductionTool/mainwindow.cpp
+++ b/app/HGProductionTool/mainwindow.cpp
@@ -410,13 +410,13 @@ void MainWindow::on_sane_dev_arrive(QString devName)
sane_open(devName.toStdString().c_str(), &devHandle);
if (nullptr != devHandle)
{
- DeviceManager *devManager = new DeviceManager(this, m_pdtToolDbuserMgr, m_formBurnMode, devHandle, devName, getDevSn(devHandle), getDevType(devHandle));
+ DeviceManager *devManager = new DeviceManager(this, m_formBurnMode, devHandle, devName);
m_formBurnMode->addDevice(devManager);
}
}
else
{
- QMessageBox msg(QMessageBox::Question, tr("tips"),
+ QMessageBox msg(QMessageBox::Warning, tr("warning"),
tr("Confirm whether the device is reset"),
QMessageBox::Yes | QMessageBox::No, this);
msg.setButtonText(QMessageBox::Yes, tr("confirm"));