Commit 0bb149bf authored by Yuelong Yu's avatar Yuelong Yu
Browse files

testing on Pco4000, fixed class error

parent b18482a2
......@@ -163,54 +163,33 @@ namespace PcoNS
if(ArmCamera() != OK)
return SET_ERROR;
cout<<"arm camera"<<endl;
// if(m_sptrGrabber->PostArm(1) != OK )
// return SET_ERROR;
//cout<<"post arm camera"<<endl;
//check current frame grabber settings
// unsigned int unCurrentX,unCurrentY,unCurrentDepth;
unsigned int unCurrentX,unCurrentY,unCurrentDepth;
m_sptrGrabber->Get_actual_size(&unCurrentX,&unCurrentY,&unCurrentDepth);
if((unCurrentX != static_cast<unsigned int>(shX))
|| (unCurrentY != static_cast<unsigned int>(shY))
||(m_sptrGrabber->Get_Framebuffer() == 0))
{
if(m_sptrGrabber->Free_Framebuffer() != OK)
return SET_ERROR;
// m_sptrGrabber->Get_actual_size(&unCurrentX,&unCurrentY,&unCurrentDepth);
// cout<<"get actual size"<<endl;
// if((unCurrentX != static_cast<unsigned int>(shX))
// || (unCurrentY != static_cast<unsigned int>(shY))
// ||(m_sptrGrabber->Get_Framebuffer() == 0))
// {
// cout<<"change setting"<<endl;
// if(m_sptrGrabber->Free_Framebuffer() != OK)
// return SET_ERROR;
// cout<<"change setting 1"<<endl;
// // if(m_sptrGrabber->Set_Grabber_Size(shX,shY) != OK)
// // return SET_ERROR;
if(m_sptrGrabber->Set_Grabber_Size(shX,shY) != OK)
return SET_ERROR;
cout<<"change setting 2"<<endl;
if(m_sptrGrabber->PostArm() != OK )
return SET_ERROR;
cout<<"change setting 3"<<endl;
if(m_sptrGrabber->Allocate_Framebuffer(20) != OK)
return SET_ERROR;
}
// if(!m_vImg.empty())
// m_vImg.clear();
// m_vImg.resize(shX*shY,0);
// }
cout<<shX*shY<<endl;
//cout<<shX*shY<<endl;
if(m_vImg.size() != static_cast<size_t>(shX*shY))
m_vImg.resize(shX*shY,0);
//10s timeout
if(m_sptrGrabber->Set_Grabber_Timeout(10000) != OK)
return SET_ERROR;
// if(SetStorageMode(1) != OK)
// return SET_ERROR;
// if(ClearRAMSegment() != OK)
// return SET_ERROR;
if(SetRecordingState(1) != OK )
return SET_ERROR;
......@@ -247,21 +226,17 @@ namespace PcoNS
if(m_vImg.empty())
return INVALID_VALUE;
cout<<"test empty"<<endl;
short shTrig1,shTrig2;
if(GetTriggerMode(shTrig1) != OK)
return GET_ERROR;
cout<<"get trigger"<<endl;
if(shTrig1 == 0x0001)//software trigger
if(ForceTrigger(shTrig2) != OK)
return START_ERROR;
cout<<"send trigger"<<endl;
if(m_sptrGrabber->Wait_For_Next_Image(&nPicNum,10) != OK)
return RECORD_ERROR;
cout<<"wait 1"<<endl;
if(m_sptrGrabber->Check_DMA_Length(nPicNum) != OK)
return GET_ERROR;
......
......@@ -113,7 +113,7 @@ namespace PcoNS
m_uptrPcoCamera = uptrCameraFactory->CreateProduct();
shared_ptr<CPco_grab_cl_me4> sptrGrabber = unique_ptr<CPco_grab_cl_me4>(
new CPco_grab_cl_me4_edge((CPco_com_cl_me4*)m_sptrCamera.get()));
new CPco_grab_cl_me4_camera((CPco_com_cl_me4*)m_sptrCamera.get()));
m_uptrPcoCamera->SetCamera(m_sptrCamera,sptrGrabber);
uptrCameraFactory.reset();
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment