This commit is contained in:
2024-10-24 14:41:35 +08:00
parent ff69e6ad2d
commit 70329c36df
16 changed files with 1061 additions and 94 deletions
@@ -281,8 +281,12 @@ bool Hd_MvCamera_module::sendData(std::vector<cv::Mat>& mat, QByteArray& data)
{
cnt++;
QThread::msleep(1);
if (cnt > 3000)
return false;
if (cnt > 200)
{
cv::Mat blank_image(100, 100, CV_8UC1, cv::Scalar(0, 0, 0));
mat.push_back(blank_image);
return true;
}
}
imgQueueMutex.lock();
mat.push_back(imgQueue.dequeue());
@@ -306,6 +310,7 @@ bool Hd_MvCamera_module::reciveData(std::vector<cv::Mat>& mat, QByteArray& data)
bool Hd_MvCamera_module::initParas(QByteArray&)
{
//return true;
if (!Username.compare("dummy"))
{
qDebug() << "[INFO] " << " start" << "--UserName: dummy creat sucess";
@@ -362,14 +367,16 @@ bool Hd_MvCamera_module::run()
m_thread->start();
int reconnectSign = reconnectCount;
int cnt = 0;
while (true)
{
if(reconnectCount!= reconnectSign)
m_thread->start();
if (m_flag)
if (m_flag || cnt>200)
{
break;
}
cnt++;
QThread::msleep(1);
}
m_flag = false;