修改识别海康固件BUG

1600-900
CJ980606 2 years ago
parent 3876b4db1c
commit 1d1a359538

@ -3116,6 +3116,7 @@ void Cigarette::EnumerateCameras(SingleCamInfoStruct *TempSingleCamInfoStruct,bo
void* camhandle; void* camhandle;
MVCC_STRINGVALUE UserID; MVCC_STRINGVALUE UserID;
MVCC_STRINGVALUE YSXID; MVCC_STRINGVALUE YSXID;
MVCC_STRINGVALUE YSXID2;
string id; string id;
MV_CC_CreateHandle(&camhandle, HIKCamera::stDeviceList.pDeviceInfo[i]); MV_CC_CreateHandle(&camhandle, HIKCamera::stDeviceList.pDeviceInfo[i]);
if (!MV_CC_OpenDevice(camhandle)) if (!MV_CC_OpenDevice(camhandle))
@ -3123,7 +3124,6 @@ void Cigarette::EnumerateCameras(SingleCamInfoStruct *TempSingleCamInfoStruct,bo
MV_CC_GetDeviceUserID(camhandle, &UserID); MV_CC_GetDeviceUserID(camhandle, &UserID);
MV_CC_GetStringValue(camhandle, "DeviceYSXID", &YSXID); MV_CC_GetStringValue(camhandle, "DeviceYSXID", &YSXID);
if(showinfo)std::cout << "Hikrobot user ID = " << UserID.chCurValue << std::endl; if(showinfo)std::cout << "Hikrobot user ID = " << UserID.chCurValue << std::endl;
cout << "Hikrobot YSX ID = " << YSXID.chCurValue << std::endl;
id = YSXID.chCurValue; id = YSXID.chCurValue;
#ifdef identify_Hik_YSXID #ifdef identify_Hik_YSXID
if (id!="YSX9256") if (id!="YSX9256")
@ -3131,6 +3131,7 @@ void Cigarette::EnumerateCameras(SingleCamInfoStruct *TempSingleCamInfoStruct,bo
QMessageBox::information(NULL, QStringLiteral("系统自检失败"), QStringLiteral("相机匹配失败,请检查相机型号"), QMessageBox::Ok); QMessageBox::information(NULL, QStringLiteral("系统自检失败"), QStringLiteral("相机匹配失败,请检查相机型号"), QMessageBox::Ok);
exit(-1); exit(-1);
} }
YSXID = YSXID2;//清除数据
#endif #endif
MV_CC_CloseDevice(camhandle); MV_CC_CloseDevice(camhandle);
} }

Loading…
Cancel
Save