Commit 7d6e419e authored by ahoms's avatar ahoms
Browse files

* modified global.inc and Makefiles to first build all

  the src directories and then all the test directories
* updated to changes in control (requiring software_operation incl)
* fixed the final frame Timestamp in frame acc. mode
* fixed the acq. (sync) number of frames in frame acc. mode
* added frame acc. test in testfreloninterface
* avoid deleting the HwInterface in CtControl, which did not create it.



git-svn-id: https://scm.blissgarden.org/svn/lima/trunk@121 45c4679d-1946-429d-baad-37912b19538b
parent f57927ea
sub-dirs = src test
src-dirs = src
test-dirs = test
include ../../global.inc
......@@ -91,7 +91,7 @@ class BufferCtrlObj : public HwBufferCtrlObj
class SyncCtrlObj : public HwSyncCtrlObj
{
public:
SyncCtrlObj(Espia::Acq& acq, Camera& cam);
SyncCtrlObj(Espia::Acq& acq, Camera& cam, BufferCtrlObj& buffer_ctrl);
virtual ~SyncCtrlObj();
virtual void setTrigMode(TrigMode trig_mode);
......@@ -111,6 +111,7 @@ class SyncCtrlObj : public HwSyncCtrlObj
private:
Espia::Acq& m_acq;
Camera& m_cam;
BufferCtrlObj& m_buffer_ctrl;
};
......
......@@ -181,8 +181,8 @@ void BufferCtrlObj::unregisterFrameCallback(HwFrameCallback& frame_cb)
* \brief SyncCtrlObj constructor
*******************************************************************/
SyncCtrlObj::SyncCtrlObj(Acq& acq, Camera& cam)
: m_acq(acq), m_cam(cam)
SyncCtrlObj::SyncCtrlObj(Acq& acq, Camera& cam, BufferCtrlObj& buffer_ctrl)
: m_acq(acq), m_cam(cam), m_buffer_ctrl(buffer_ctrl)
{
}
......@@ -222,13 +222,19 @@ void SyncCtrlObj::getLatTime(double& lat_time)
void SyncCtrlObj::setNbFrames(int nb_frames)
{
m_acq.setNbFrames(nb_frames);
m_cam.setNbFrames(nb_frames);
int nb_acc_frames;
m_buffer_ctrl.getNbAccFrames(nb_acc_frames);
int real_nb_frames = nb_frames * nb_acc_frames;
m_acq.setNbFrames(real_nb_frames);
m_cam.setNbFrames(real_nb_frames);
}
void SyncCtrlObj::getNbFrames(int& nb_frames)
{
m_acq.getNbFrames(nb_frames);
int nb_acc_frames;
m_buffer_ctrl.getNbAccFrames(nb_acc_frames);
nb_frames /= nb_acc_frames;
}
void SyncCtrlObj::getValidRanges(ValidRangesType& valid_ranges)
......@@ -301,7 +307,7 @@ void RoiCtrlObj::getRoi(Roi& roi)
Interface::Interface(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_det_info(cam), m_buffer(buffer_mgr), m_sync(acq, cam, m_buffer),
m_bin(cam), m_roi(cam)
{
HwDetInfoCtrlObj *det_info = &m_det_info;
......@@ -366,6 +372,7 @@ void Interface::prepareAcq()
void Interface::startAcq()
{
m_buffer_mgr.setStartTimestamp(Timestamp::now());
m_acq.start();
m_cam.start();
}
......
......@@ -10,6 +10,7 @@ LDLIBS = -lespia
CXXFLAGS = -I../include -I../../common/espia/include \
-I../../../hardware/include -I../../../common/include \
-I../../../control/include/ \
-I../../../control/software_operation/include/ \
-I../../../third-party/Processlib/core/include \
-I../../../third-party/Processlib/tasks/include \
-I$(ESPIA_DRV_INCL) -Wall -pthread
......
......@@ -153,7 +153,7 @@ void test_frelon_hw_inter(bool do_reset)
Frelon::Interface hw_inter(acq, buffer_mgr, cam);
cout << " Done!" << endl;
CtControl aControl(NULL);
CtControl aControl(&hw_inter);
CtSaving buffer_save(aControl);
CtSaving::Parameters saving_par;
saving_par.directory = ".";
......@@ -290,6 +290,20 @@ void test_frelon_hw_inter(bool do_reset)
print_status(hw_inter);
hw_inter.stopAcq();
print_status(hw_inter);
hw_buffer->setFrameDim(effect_frame_dim);
hw_buffer->setNbAccFrames(5);
hw_buffer->setNbBuffers(10);
hw_sync->setNbFrames(3);
print_status(hw_inter);
hw_inter.startAcq();
acq_finished.wait();
PoolThreadMgr::get().wait();
print_status(hw_inter);
hw_inter.stopAcq();
print_status(hw_inter);
}
int main(int argc, char *argv[])
......
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