Commit 42ec5794 authored by Laurent Claustre's avatar Laurent Claustre
Browse files

Merge branch '8-add-support-for-live-mode' into 'master'

Resolve "add support for live mode"

Closes #8

See merge request !14
parents 8a095dd4 df41887a
Pipeline #50052 passed with stages
in 15 minutes and 19 seconds
......@@ -353,6 +353,10 @@ void SyncCtrlObj::getLatTime(double& lat_time)
//-----------------------------------------------------
void SyncCtrlObj::setNbHwFrames(int nb_frames)
{
DEB_MEMBER_FUNCT();
if (nb_frames > 65535)
THROW_HW_ERROR(InvalidValue) << "Maximum number of frames is 65535";
m_nb_frames = nb_frames;
}
......@@ -401,7 +405,18 @@ void SyncCtrlObj::prepareAcq()
}
m_cam.setExposurePeriod(exposure_period);
int nb_frames = (trig_mode == IntTrigMult)?1:m_nb_frames;
int nb_frames;
// For IntTrigMult only one frame must be set and startAcq() will retrig a single frame
// This is the only trigger mode which can run the for ever, For the other modes we must
// workaround the number of frames to the maximum value than camserver can accept, this
// is risky !!
if (trig_mode == IntTrigMult)
nb_frames = 1;
else if (m_nb_frames == 0)
nb_frames = 65535;
else
nb_frames = m_nb_frames;
m_cam.setNbImagesInSequence(nb_frames);
}
......@@ -754,6 +769,15 @@ Interface::Interface(Camera& cam,const DetInfoCtrlObj::Info* info)
HwDetInfoCtrlObj *det_info = &m_det_info;
m_cap_list.push_back(HwCap(det_info));
// Usually ramdisk is use to store image files saved by camserver
// default max memory size use in HwTmpfsBufferMgr is 50% of the provided ramdisk.
// we increase here the size to 95% of the available ramdisk.
// The buffer will calculate how many frames (edf files) in can store in
// this mapped disk. For instance if the ramdisk is about 16GB and we stay at 50%
// only 8GB can be used to store the images, With a fast and long acquisition
// one can get an overrun error.
m_buffer.setMemoryPercent(0.95);
HwBufferCtrlObj *buffer = &m_buffer;
m_cap_list.push_back(HwCap(buffer));
......
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