|
|
@ -693,6 +693,7 @@ void Cigarette::OnExit()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
emit sengMsgToClog("Close the Application.");
|
|
|
|
emit sengMsgToClog("Close the Application.");
|
|
|
|
Exit();
|
|
|
|
Exit();
|
|
|
|
|
|
|
|
exit(-1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void Cigarette::OnRestart()
|
|
|
|
void Cigarette::OnRestart()
|
|
|
@ -3230,20 +3231,21 @@ void Cigarette::EnableDebugMode()
|
|
|
|
else if(SingleCamInfo[i].CamClass == BaslerClassID)
|
|
|
|
else if(SingleCamInfo[i].CamClass == BaslerClassID)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
bool nRet = false;
|
|
|
|
bool nRet = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
nRet = BaslerCamHandle[i]->AcquisitionFrameRate.TrySetValue(10);
|
|
|
|
|
|
|
|
if (!nRet) { std::cout << "can not set Basler's AcquisitionFrameRate" << std::endl; }
|
|
|
|
|
|
|
|
nRet = BaslerCamHandle[i]->AcquisitionFrameRateEnable.TrySetValue(true);
|
|
|
|
|
|
|
|
if (!nRet) { std::cout << "can not set Basler's AcquisitionFrameRateEnable" << std::endl; }
|
|
|
|
|
|
|
|
nRet = BaslerCamHandle[i]->TriggerSelector.TrySetValue(Basler_UniversalCameraParams::TriggerSelector_FrameStart);
|
|
|
|
|
|
|
|
if (!nRet) { std::cout << "can not set Basler's TriggerSelector_FrameStart" << std::endl; }
|
|
|
|
|
|
|
|
nRet = BaslerCamHandle[i]->TriggerMode.TrySetValue(Basler_UniversalCameraParams::TriggerMode_Off);
|
|
|
|
|
|
|
|
if (!nRet) { std::cout << "can not set Basler's TriggerMode_Off" << std::endl; }
|
|
|
|
#ifndef USB_BASLER_NEW_FW
|
|
|
|
#ifndef USB_BASLER_NEW_FW
|
|
|
|
BaslerCamHandle[i]->TriggerSelector.SetValue(Basler_UniversalCameraParams::TriggerSelector_FrameBurstStart);
|
|
|
|
nRet = BaslerCamHandle[i]->TriggerSelector.TrySetValue(Basler_UniversalCameraParams::TriggerSelector_FrameBurstStart);
|
|
|
|
if (!nRet) { std::cout << "can not set TriggerSelector_FrameBurstStart" << std::endl;}
|
|
|
|
if (!nRet) { std::cout << "can not set Basler's TriggerSelector_FrameBurstStart" << std::endl;}
|
|
|
|
BaslerCamHandle[i]->TriggerMode.SetValue(Basler_UniversalCameraParams::TriggerMode_Off);
|
|
|
|
nRet = BaslerCamHandle[i]->TriggerMode.TrySetValue(Basler_UniversalCameraParams::TriggerMode_Off);
|
|
|
|
if (!nRet) { std::cout << "can not set TriggerMode_Off" << std::endl;}
|
|
|
|
if (!nRet) { std::cout << "can not set Basler's TriggerMode_Off" << std::endl;}
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
BaslerCamHandle[i]->TriggerSelector.SetValue(Basler_UniversalCameraParams::TriggerSelector_FrameStart);
|
|
|
|
|
|
|
|
//if (!nRet) { std::cout << "can not set Basler's TriggerSelector_FrameStart" << std::endl;}
|
|
|
|
|
|
|
|
BaslerCamHandle[i]->TriggerMode.SetValue(Basler_UniversalCameraParams::TriggerMode_Off);
|
|
|
|
|
|
|
|
//if (!nRet) { std::cout << "can not set Basler's TriggerMode_Off" << std::endl;}
|
|
|
|
|
|
|
|
BaslerCamHandle[i]->AcquisitionFrameRateEnable.SetValue(true);
|
|
|
|
|
|
|
|
//if (!nRet) { std::cout << "can not set Basler's AcquisitionFrameRateEnable" << std::endl;}
|
|
|
|
|
|
|
|
BaslerCamHandle[i]->AcquisitionFrameRate.SetValue(10);
|
|
|
|
|
|
|
|
//if (!nRet) { std::cout << "can not set Basler's AcquisitionFrameRate" << std::endl;}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -3267,34 +3269,34 @@ void Cigarette::DisableDebugMode()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
int nRet = MV_OK;
|
|
|
|
int nRet = MV_OK;
|
|
|
|
nRet = MV_CC_SetEnumValue(HIKCamHandle[i], "TriggerMode", MV_TRIGGER_MODE_ON);
|
|
|
|
nRet = MV_CC_SetEnumValue(HIKCamHandle[i], "TriggerMode", MV_TRIGGER_MODE_ON);
|
|
|
|
if (nRet) { std::cout << "can not set TriggerMode" << std::endl;}
|
|
|
|
if (nRet) { std::cout << "can not set Hik's TriggerMode" << std::endl;}
|
|
|
|
|
|
|
|
|
|
|
|
nRet = MV_CC_SetEnumValue(HIKCamHandle[i], "TriggerSource", MV_TRIGGER_SOURCE_LINE2);
|
|
|
|
nRet = MV_CC_SetEnumValue(HIKCamHandle[i], "TriggerSource", MV_TRIGGER_SOURCE_LINE2);
|
|
|
|
if (nRet) { std::cout << "can not set TriggerSource" << std::endl;}
|
|
|
|
if (nRet) { std::cout << "can not set Hik's TriggerSource" << std::endl;}
|
|
|
|
|
|
|
|
|
|
|
|
nRet = MV_CC_SetEnumValue(HIKCamHandle[i], "TriggerActivation", 1);//1±íʾϽµÑØ
|
|
|
|
nRet = MV_CC_SetEnumValue(HIKCamHandle[i], "TriggerActivation", 1);//1±íʾϽµÑØ
|
|
|
|
if (nRet) { std::cout << "can not set TriggerActivation" << std::endl;}
|
|
|
|
if (nRet) { std::cout << "can not set Hik's TriggerActivation" << std::endl;}
|
|
|
|
|
|
|
|
|
|
|
|
nRet = MV_CC_SetFrameRate(HIKCamHandle[i], 1000.0);
|
|
|
|
nRet = MV_CC_SetFrameRate(HIKCamHandle[i], 1000.0);
|
|
|
|
if (nRet) { std::cout << "can not set FrameInfo" << std::endl;}
|
|
|
|
if (nRet) { std::cout << "can not set Hik's FrameInfo" << std::endl;}
|
|
|
|
nRet = MV_CC_SetBoolValue(HIKCamHandle[i], "AcquisitionFrameRateEnable",false);
|
|
|
|
nRet = MV_CC_SetBoolValue(HIKCamHandle[i], "AcquisitionFrameRateEnable",false);
|
|
|
|
if (nRet) { std::cout << "can not set AcquisitionFrameRateEnable" << std::endl;}
|
|
|
|
if (nRet) { std::cout << "can not set Hik's AcquisitionFrameRateEnable" << std::endl;}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if(SingleCamInfo[i].CamClass == BaslerClassID)
|
|
|
|
else if(SingleCamInfo[i].CamClass == BaslerClassID)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
bool nRet = false;
|
|
|
|
bool nRet = false;
|
|
|
|
#ifndef USB_BASLER_NEW_FW
|
|
|
|
#ifndef USB_BASLER_NEW_FW
|
|
|
|
nRet = BaslerCamHandle[i]->TriggerSelector.TrySetValue(Basler_UniversalCameraParams::TriggerSelector_FrameBurstStart);
|
|
|
|
nRet = BaslerCamHandle[i]->TriggerSelector.TrySetValue(Basler_UniversalCameraParams::TriggerSelector_FrameBurstStart);
|
|
|
|
if (!nRet) { std::cout << "can not set TriggerSelector_FrameBurstStart" << std::endl;}
|
|
|
|
if (!nRet) { std::cout << "can not set Basler's TriggerSelector_FrameBurstStart" << std::endl;}
|
|
|
|
nRet = BaslerCamHandle[i]->TriggerMode.TrySetValue(Basler_UniversalCameraParams::TriggerMode_On);
|
|
|
|
nRet = BaslerCamHandle[i]->TriggerMode.TrySetValue(Basler_UniversalCameraParams::TriggerMode_On);
|
|
|
|
|
|
|
|
if (!nRet) { std::cout << "can not set Basler's TriggerMode_On" << std::endl; }
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
if (!nRet) { std::cout << "can not set TriggerMode_On" << std::endl;}
|
|
|
|
|
|
|
|
nRet = BaslerCamHandle[i]->TriggerSelector.TrySetValue(Basler_UniversalCameraParams::TriggerSelector_FrameStart);
|
|
|
|
nRet = BaslerCamHandle[i]->TriggerSelector.TrySetValue(Basler_UniversalCameraParams::TriggerSelector_FrameStart);
|
|
|
|
if (!nRet) { std::cout << "can not set TriggerSelector_FrameStart" << std::endl;}
|
|
|
|
if (!nRet) { std::cout << "can not set Basler's TriggerSelector_FrameStart" << std::endl;}
|
|
|
|
nRet = BaslerCamHandle[i]->TriggerMode.TrySetValue(Basler_UniversalCameraParams::TriggerMode_On);
|
|
|
|
nRet = BaslerCamHandle[i]->TriggerMode.TrySetValue(Basler_UniversalCameraParams::TriggerMode_On);
|
|
|
|
if (!nRet) { std::cout << "can not set TriggerMode_On" << std::endl;}
|
|
|
|
if (!nRet) { std::cout << "can not set Basler's TriggerMode_On" << std::endl;}
|
|
|
|
nRet = BaslerCamHandle[i]->AcquisitionFrameRateEnable.TrySetValue(false);
|
|
|
|
nRet = BaslerCamHandle[i]->AcquisitionFrameRateEnable.TrySetValue(false);
|
|
|
|
if (!nRet) { std::cout << "can not set AcquisitionFrameRateEnable" << std::endl;}
|
|
|
|
if (!nRet) { std::cout << "can not set Basler's AcquisitionFrameRateEnable" << std::endl;}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|