Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
DetectorSoftware
pcosdk
Commits
0bb149bf
Commit
0bb149bf
authored
Oct 16, 2019
by
Yuelong Yu
Browse files
testing on Pco4000, fixed class error
parent
b18482a2
Changes
2
Hide whitespace changes
Inline
Side-by-side
pcome4/Pco4000.cpp
View file @
0bb149bf
...
...
@@ -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
;
...
...
pcome4/PcoMe4Impl.cpp
View file @
0bb149bf
...
...
@@ -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
();
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment