添加识别海康相机YSXID功能,关闭调试模式后换班一次清除计数加一

1600-900
chu270213 2 years ago
parent a8ad96ba65
commit ee80071d78

@ -1151,6 +1151,7 @@ void Cigarette::on_checkBox_debug_clicked(bool checked)
{
emit sengMsgToClog("Exit debug mode.");
DisableDebugMode();
on_pushButton_clear_released(); //换班
ui.checkBox_debug->setChecked(false);
#ifdef __UDPSend
sThread.sendData("DebugDis", g_sys_conf.FeedbackPort);
@ -3107,11 +3108,23 @@ void Cigarette::EnumerateCameras(SingleCamInfoStruct *TempSingleCamInfoStruct,bo
{
void* camhandle;
MVCC_STRINGVALUE UserID;
MVCC_STRINGVALUE YSXID;
string id;
MV_CC_CreateHandle(&camhandle, HIKCamera::stDeviceList.pDeviceInfo[i]);
if (!MV_CC_OpenDevice(camhandle))
{
MV_CC_GetDeviceUserID(camhandle, &UserID);
MV_CC_GetStringValue(camhandle, "DeviceYSXID", &YSXID);
if(showinfo)std::cout << "Hikrobot user ID = " << UserID.chCurValue << std::endl;
cout << "Hikrobot YSX ID = " << YSXID.chCurValue << std::endl;
id = YSXID.chCurValue;
#ifdef identify_Hik_YSXID
if (id!="YSX9256")
{
QMessageBox::information(NULL, QStringLiteral("系统自检失败"), QStringLiteral("相机匹配失败,请检查相机型号"), QMessageBox::Ok);
exit(-1);
}
#endif
MV_CC_CloseDevice(camhandle);
}
MV_CC_DestroyHandle(camhandle);
@ -3278,7 +3291,7 @@ void Cigarette::DisableDebugMode()
}
}
g_debug_mode = false;
on_pushButton_clear_released(); //»»°à
}
void Cigarette::CleanThreadStart()
@ -3775,9 +3788,6 @@ void Cigarette::recMsgFromUdp(QString data)
str += QString::number(g_sys_conf.no[i][0]) + '_' + QString::number(g_sys_conf.no[i][1]) + '_' + QString::number(g_sys_conf.no[i][2]) + '_';
}
sThread.sendData(str, g_sys_conf.FeedbackPort);
printf("=====>send Message is = %s\n", str.toStdString().c_str());
qDebug() << "getsettingpro:" << dataList;
qDebug() << "str:" << str.toStdString().c_str();
}
else if (dataList[0] == "UPDSETTING")
{

@ -19,6 +19,7 @@
//#define CAP_FEED_BACK //拍照时也检测有没有测试结果,有的话就反馈
//#define DOUBLE_FEED_BACK //一次ng两次反馈ng信号
#endif
#define identify_Hik_YSXID//识别海康相机YSXID
#define Queue_Size 15
#define Unit_Queue_Size Queue_Size*3

Loading…
Cancel
Save