修改退出不完全的问题,交换一些代码位置,添加一些字串

1600-900
Jeffrey_Li 2 years ago
parent 1d1a359538
commit e792799564

@ -693,6 +693,7 @@ void Cigarette::OnExit()
{
emit sengMsgToClog("Close the Application.");
Exit();
exit(-1);
}
void Cigarette::OnRestart()
@ -3230,20 +3231,21 @@ void Cigarette::EnableDebugMode()
else if(SingleCamInfo[i].CamClass == BaslerClassID)
{
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
BaslerCamHandle[i]->TriggerSelector.SetValue(Basler_UniversalCameraParams::TriggerSelector_FrameBurstStart);
if (!nRet) { std::cout << "can not set TriggerSelector_FrameBurstStart" << std::endl;}
BaslerCamHandle[i]->TriggerMode.SetValue(Basler_UniversalCameraParams::TriggerMode_Off);
if (!nRet) { std::cout << "can not set TriggerMode_Off" << std::endl;}
nRet = BaslerCamHandle[i]->TriggerSelector.TrySetValue(Basler_UniversalCameraParams::TriggerSelector_FrameBurstStart);
if (!nRet) { std::cout << "can not set Basler's TriggerSelector_FrameBurstStart" << std::endl;}
nRet = BaslerCamHandle[i]->TriggerMode.TrySetValue(Basler_UniversalCameraParams::TriggerMode_Off);
if (!nRet) { std::cout << "can not set Basler's TriggerMode_Off" << std::endl;}
#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;
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);
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±íʾϽµÑØ
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);
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);
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)
{
bool nRet = false;
#ifndef USB_BASLER_NEW_FW
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);
if (!nRet) { std::cout << "can not set Basler's TriggerMode_On" << std::endl; }
#endif
if (!nRet) { std::cout << "can not set TriggerMode_On" << std::endl;}
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);
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);
if (!nRet) { std::cout << "can not set AcquisitionFrameRateEnable" << std::endl;}
if (!nRet) { std::cout << "can not set Basler's AcquisitionFrameRateEnable" << std::endl;}
}
}
}

Loading…
Cancel
Save