mqtt,将companyCode改为可配置
This commit is contained in:
parent
f7a9c3f104
commit
a86af9df1c
|
@ -398,7 +398,9 @@ MainWindow::MainWindow(const QString& appLang, QWidget *parent)
|
||||||
HGSaneDeviceCustomInfo custemInfo;
|
HGSaneDeviceCustomInfo custemInfo;
|
||||||
#endif
|
#endif
|
||||||
m_devUser->GetDeviceCustomInfo(&custemInfo);
|
m_devUser->GetDeviceCustomInfo(&custemInfo);
|
||||||
mqtt_publish_device_properties(custemInfo.ip, custemInfo.driverVer, custemInfo.type, "HG");
|
|
||||||
|
std::string companyCode = getCfgValue("mqtt", "companyCode", QString("HG")).toStdString();
|
||||||
|
mqtt_publish_device_properties(custemInfo.ip, custemInfo.driverVer, custemInfo.type, companyCode.c_str());
|
||||||
|
|
||||||
m_wndStatusBar->setDeviceStatusInfo(tr("Device %1 is open").arg(m_devUser->GetName()), false);
|
m_wndStatusBar->setDeviceStatusInfo(tr("Device %1 is open").arg(m_devUser->GetName()), false);
|
||||||
connect(m_devUser, SIGNAL(newImage(void*)), this, SLOT(on_newImage(void*)), Qt::DirectConnection);
|
connect(m_devUser, SIGNAL(newImage(void*)), this, SLOT(on_newImage(void*)), Qt::DirectConnection);
|
||||||
|
@ -4962,7 +4964,9 @@ void MainWindow::on_act_selectDevice_triggered()
|
||||||
HGSaneDeviceCustomInfo custemInfo;
|
HGSaneDeviceCustomInfo custemInfo;
|
||||||
#endif
|
#endif
|
||||||
m_devUser->GetDeviceCustomInfo(&custemInfo);
|
m_devUser->GetDeviceCustomInfo(&custemInfo);
|
||||||
mqtt_publish_device_properties(custemInfo.ip, custemInfo.driverVer, custemInfo.type, "HG");
|
|
||||||
|
std::string companyCode = getCfgValue("mqtt", "companyCode", QString("HG")).toStdString();
|
||||||
|
mqtt_publish_device_properties(custemInfo.ip, custemInfo.driverVer, custemInfo.type, companyCode.c_str());
|
||||||
|
|
||||||
m_devUser->Login();
|
m_devUser->Login();
|
||||||
m_wndStatusBar->setDeviceStatusInfo(tr("Device %1 is open").arg(m_devUser->GetName()), false);
|
m_wndStatusBar->setDeviceStatusInfo(tr("Device %1 is open").arg(m_devUser->GetName()), false);
|
||||||
|
|
Loading…
Reference in New Issue