diff --git a/src/tpMain/WheelNet.cpp b/src/tpMain/WheelNet.cpp index 04b5030..60b9f38 100644 --- a/src/tpMain/WheelNet.cpp +++ b/src/tpMain/WheelNet.cpp @@ -17,6 +17,8 @@ CWheelNet::CWheelNet(QString strRoot) :// m_pNet4Wheel(NULL), m_strRoot(strRoot) { + connect(this, SIGNAL(sgSendData(QSharedPointer)), this, SLOT(onSendData(QSharedPointer))); + m_pIpConfig = new IPConfig; loadIpConfig(); loadNet(); @@ -153,12 +155,9 @@ void CWheelNet::sendData(QString strData) // emit sgSendData2Dv(strTarget, arr); // } - if (m_pTcpServer) - { - QSharedPointer pData = QSharedPointer(new QByteArray); - pData->append(strData); - m_pTcpServer->broadcast_send_data(pData); - } + QSharedPointer pData = QSharedPointer(new QByteArray); + pData->append(strData); + emit sgSendData(pData); } bool CWheelNet::sendDataFrame(QString strData) @@ -507,3 +506,11 @@ Q_SLOT void CWheelNet::onDataRecv(int id, QSharedPointer pData) { DataRecvByte(*pData); } + +Q_SLOT void CWheelNet::onSendData(QSharedPointer pData) +{ + if (m_pTcpServer) + { + m_pTcpServer->broadcast_send_data(pData); + } +} diff --git a/src/tpMain/WheelNet.h b/src/tpMain/WheelNet.h index 3583655..1c09ccb 100644 --- a/src/tpMain/WheelNet.h +++ b/src/tpMain/WheelNet.h @@ -32,6 +32,7 @@ public: Q_SLOT void onCloseServer(); Q_SLOT void onSendDataByType(int nType, QVariantMap nMap); Q_SLOT void onDataRecv(int id, QSharedPointer pData); + Q_SLOT void onSendData(QSharedPointer pData); private: Q_SLOT void DataRecvByte(QByteArray m_data); Q_SLOT void onConnect(QVariantMap vMap); @@ -75,6 +76,8 @@ signals: void sgShutDownComputer(); void sgSendData2Dv(QString,QByteArray); + + void sgSendData(QSharedPointer); public: void onShowIpDlg(QWidget* parent); QString getIp(EM_NET_TYPE type) const; diff --git a/tpvs17/tpMain/lpMainWin.cpp b/tpvs17/tpMain/lpMainWin.cpp index 062834a..3003238 100644 --- a/tpvs17/tpMain/lpMainWin.cpp +++ b/tpvs17/tpMain/lpMainWin.cpp @@ -23,9 +23,9 @@ #include #include "lpCryptokey.h" -#define VERSION_HUB "3.0.3.3" +#define VERSION_HUB "3.0.3.4" #define VERSION_ALG "3.0.1.6" -#define UPDATE_TIME "2022-05-27" +#define UPDATE_TIME "2022-06-20" #define WHEELHIGHTTHRESH 260.0 //轮毂高度阈值,当轮毂高度大于这个值时,启用相机升高的直径算法 #define CAMERAUPHEIGHT 254.0 //相机上升高度,默认10英寸