Commit 50a74fe2 authored by ahoms's avatar ahoms

* implemented the correction of acq. frames in frame acc. mode

  inside HwInterface and HwSyncCtrlObj
* updated Frelon, Focla and Simulator interfaces



git-svn-id: https://scm.blissgarden.org/svn/lima/trunk@123 45c4679d-1946-429d-baad-37912b19538b
parent 7518ccf8
......@@ -103,15 +103,14 @@ class SyncCtrlObj : public HwSyncCtrlObj
virtual void setLatTime(double lat_time);
virtual void getLatTime(double& lat_time);
virtual void setNbFrames(int nb_frames);
virtual void getNbFrames(int& nb_frames);
virtual void setNbHwFrames(int nb_frames);
virtual void getNbHwFrames(int& nb_frames);
virtual void getValidRanges(ValidRangesType& valid_ranges);
private:
Espia::Acq& m_acq;
Camera& m_cam;
BufferCtrlObj& m_buffer_ctrl;
};
......@@ -173,7 +172,7 @@ class Interface : public HwInterface
virtual void startAcq();
virtual void stopAcq();
virtual void getStatus(StatusType& status);
virtual int getNbAcquiredFrames();
virtual int getNbHwAcquiredFrames();
private:
Espia::Acq& m_acq;
......
......@@ -182,7 +182,7 @@ void BufferCtrlObj::unregisterFrameCallback(HwFrameCallback& frame_cb)
*******************************************************************/
SyncCtrlObj::SyncCtrlObj(Acq& acq, Camera& cam, BufferCtrlObj& buffer_ctrl)
: m_acq(acq), m_cam(cam), m_buffer_ctrl(buffer_ctrl)
: HwSyncCtrlObj(buffer_ctrl), m_acq(acq), m_cam(cam)
{
}
......@@ -220,21 +220,15 @@ void SyncCtrlObj::getLatTime(double& lat_time)
m_cam.getLatTime(lat_time);
}
void SyncCtrlObj::setNbFrames(int nb_frames)
void SyncCtrlObj::setNbHwFrames(int 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);
m_acq.setNbFrames(nb_frames);
m_cam.setNbFrames(nb_frames);
}
void SyncCtrlObj::getNbFrames(int& nb_frames)
void SyncCtrlObj::getNbHwFrames(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)
......@@ -410,13 +404,11 @@ void Interface::getStatus(StatusType& status)
status.det |= Latency;
}
int Interface::getNbAcquiredFrames()
int Interface::getNbHwAcquiredFrames()
{
Acq::Status acq_status;
m_acq.getStatus(acq_status);
int nb_acc_frames;
m_buffer.getNbAccFrames(nb_acc_frames);
return (acq_status.last_frame_nb + 1) / nb_acc_frames;
return (acq_status.last_frame_nb + 1);
}
Markdown is supported
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