Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
LimaGroup
Lima-camera-frelon
Commits
0720d5f1
Commit
0720d5f1
authored
Jul 22, 2020
by
Alejandro Homs Puron
Committed by
Laurent Claustre
Mar 25, 2022
Browse files
Add flip support to Frelon16, including Espia SG inv. for Dual-SPB8
parent
238cf1bb
Changes
7
Hide whitespace changes
Inline
Side-by-side
include/FrelonInterface.h
View file @
0720d5f1
...
...
@@ -301,7 +301,7 @@ class FlipCtrlObj : public HwFlipCtrlObj
DEB_CLASS_NAMESPC
(
DebModCamera
,
"FlipCtrlObj"
,
"Frelon"
);
public:
FlipCtrlObj
(
Camera
&
cam
);
FlipCtrlObj
(
Espia
::
Acq
&
acq
,
Camera
&
cam
);
virtual
~
FlipCtrlObj
();
virtual
void
setFlip
(
const
Flip
&
flip
);
...
...
@@ -309,6 +309,7 @@ class FlipCtrlObj : public HwFlipCtrlObj
virtual
void
checkFlip
(
Flip
&
flip
);
private:
Espia
::
Acq
&
m_acq
;
Camera
&
m_cam
;
};
...
...
include/FrelonModel.h
View file @
0720d5f1
...
...
@@ -140,6 +140,7 @@ class Model
ChipType
getChipType
();
SPBConType
getSPBConType
();
GeomType
getGeomType
();
bool
isFrelon16Dual
();
bool
has
(
Feature
feature
);
double
getPixelSize
();
...
...
sip/FrelonInterface.sip
View file @
0720d5f1
...
...
@@ -241,7 +241,7 @@ class FlipCtrlObj : HwFlipCtrlObj
%End
public:
FlipCtrlObj(Frelon::Camera& cam);
FlipCtrlObj(
Espia::Acq& acq,
Frelon::Camera& cam);
virtual ~FlipCtrlObj();
virtual void setFlip(const Flip& flip);
...
...
sip/FrelonModel.sip
View file @
0720d5f1
...
...
@@ -90,6 +90,7 @@ class Model
Frelon::ChipType getChipType();
Frelon::SPBConType getSPBConType();
Frelon::GeomType getGeomType();
bool isFrelon16Dual();
bool has(Model::Feature feature);
double getPixelSize();
...
...
src/FrelonGeometry.cpp
View file @
0720d5f1
...
...
@@ -355,12 +355,7 @@ void Geometry::checkFlip(Flip& flip)
{
DEB_MEMBER_FUNCT
();
DEB_PARAM
()
<<
DEB_VAR1
(
flip
);
if
(
isFrelon16
())
{
DEB_TRACE
()
<<
"No flip is supported"
;
flip
=
Flip
(
false
);
}
else
{
DEB_TRACE
()
<<
"All standard flip modes are supported"
;
}
DEB_TRACE
()
<<
"All standard flip modes are supported"
;
DEB_RETURN
()
<<
DEB_VAR1
(
flip
);
}
...
...
src/FrelonInterface.cpp
View file @
0720d5f1
...
...
@@ -445,11 +445,9 @@ void BinCtrlObj::setBin(const Bin& bin)
m_acq
.
getSGImgConfig
(
img_config
,
prev_size
);
FrameDim
det_frame_dim
;
m_cam
.
getFrameDim
(
det_frame_dim
);
Size
new_size
=
det_frame_dim
.
getSize
()
/
bin
;
if
(
new_size
!=
prev_size
)
{
m_acq
.
bufferFree
();
Size
new_size
=
det_frame_dim
.
getSize
()
/
bin
;
if
(
new_size
!=
prev_size
)
m_acq
.
setSGImgConfig
(
img_config
,
new_size
);
}
if
(
m_bin_chg_cb
)
{
DEB_TRACE
()
<<
"Firing change callback"
;
...
...
@@ -640,8 +638,8 @@ void RoiCtrlObj::unregisterRoiChangedCallback(RoiChangedCallback& roi_chg_cb)
* \brief FlipCtrlObj constructor
*******************************************************************/
FlipCtrlObj
::
FlipCtrlObj
(
Camera
&
cam
)
:
m_cam
(
cam
)
FlipCtrlObj
::
FlipCtrlObj
(
Espia
::
Acq
&
acq
,
Camera
&
cam
)
:
m_acq
(
acq
),
m_cam
(
cam
)
{
DEB_CONSTRUCTOR
();
}
...
...
@@ -654,7 +652,19 @@ FlipCtrlObj::~FlipCtrlObj()
void
FlipCtrlObj
::
setFlip
(
const
Flip
&
flip
)
{
DEB_MEMBER_FUNCT
();
m_cam
.
setFlip
(
flip
);
if
(
!
m_cam
.
getModel
().
isFrelon16Dual
())
return
;
Espia
::
SGImgConfig
img_config
=
(
flip
.
y
?
Espia
::
SGImgConcatVertInv2
:
Espia
::
SGImgConcatVert2
);
FrameDim
det_frame_dim
;
m_cam
.
getFrameDim
(
det_frame_dim
);
Bin
bin
;
m_cam
.
getBin
(
bin
);
det_frame_dim
/=
bin
;
m_acq
.
setSGImgConfig
(
img_config
,
det_frame_dim
.
getSize
());
}
void
FlipCtrlObj
::
getFlip
(
Flip
&
flip
)
...
...
@@ -817,12 +827,12 @@ Interface::Interface(Espia::Acq& acq, BufferCtrlMgr& buffer_mgr,
Camera
&
cam
)
:
m_acq
(
acq
),
m_buffer_mgr
(
buffer_mgr
),
m_cam
(
cam
),
m_det_info
(
cam
),
m_buffer
(
buffer_mgr
),
m_sync
(
acq
,
cam
),
m_bin
(
acq
,
cam
),
m_roi
(
acq
,
cam
),
m_flip
(
cam
),
m_shutter
(
cam
),
m_bin
(
acq
,
cam
),
m_roi
(
acq
,
cam
),
m_flip
(
acq
,
cam
),
m_shutter
(
cam
),
m_acq_end_cb
(
cam
),
m_event_cb
(
m_event
)
{
DEB_CONSTRUCTOR
();
bool
f16_dual
=
(
m_cam
.
getModel
().
getGeomType
()
==
SPB8_F
16
_
Dual
);
bool
f16_dual
=
m_cam
.
getModel
().
isFrelon
16Dual
(
);
if
(
f16_dual
!=
m_acq
.
getDev
().
isMeta
())
THROW_HW_ERROR
(
Error
)
<<
"Frelon16 2xSPB8 / Espia mismatch"
;
Espia
::
SGImgConfig
img_config
=
(
f16_dual
?
Espia
::
SGImgConcatVert2
:
...
...
src/FrelonModel.cpp
View file @
0720d5f1
...
...
@@ -403,6 +403,14 @@ GeomType Model::getGeomType()
return
geom_type
;
}
bool
Model
::
isFrelon16Dual
()
{
DEB_MEMBER_FUNCT
();
bool
is_dual
=
(
getGeomType
()
==
SPB8_F16_Dual
);
DEB_RETURN
()
<<
DEB_VAR1
(
is_dual
);
return
is_dual
;
}
double
Model
::
getPixelSize
()
{
DEB_MEMBER_FUNCT
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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