Commit 1aae56bf authored by Alejandro Homs Puron's avatar Alejandro Homs Puron

* Added IntTrigMult support

parent 85fd38cc
......@@ -1297,7 +1297,9 @@ void Camera::setNbFrames(int nb_frames)
TrigMode trig_mode;
getTrigMode(trig_mode);
bool one_frame = (trig_mode == ExtTrigMult) || (trig_mode == ExtGate);
bool one_frame = ((trig_mode == IntTrigMult) ||
(trig_mode == ExtTrigMult) ||
(trig_mode == ExtGate));
int cam_nb_frames = one_frame ? 1 : nb_frames;
writeRegister(NbFrames, cam_nb_frames);
m_nb_frames = nb_frames;
......@@ -1455,12 +1457,12 @@ void Camera::start()
AutoMutex l = lock();
if (m_started)
THROW_HW_ERROR(InvalidValue) << "Camera already running!";
TrigMode trig_mode;
getTrigMode(trig_mode);
if (trig_mode == IntTrig) {
if (m_started && (trig_mode != IntTrigMult))
THROW_HW_ERROR(InvalidValue) << "Camera already running!";
if ((trig_mode == IntTrig) || (m_trig_mode == IntTrigMult)) {
DEB_TRACE() << "Starting camera by software";
sendCmd(Start);
} else if (m_model.hasGoodHTD()) {
......
......@@ -284,6 +284,7 @@ bool SyncCtrlObj::checkTrigMode(TrigMode trig_mode)
bool valid_mode;
switch (trig_mode) {
case IntTrig:
case IntTrigMult:
case ExtTrigSingle:
case ExtTrigMult:
case ExtGate:
......@@ -893,12 +894,19 @@ void Interface::startAcq()
{
DEB_MEMBER_FUNCT();
m_buffer_mgr.setStartTimestamp(Timestamp::now());
m_acq.start();
TrigMode trig_mode;
m_cam.getTrigMode(trig_mode);
bool acq_start = (trig_mode != IntTrigMult) || !m_cam.isRunning();
if (acq_start) {
m_buffer_mgr.setStartTimestamp(Timestamp::now());
m_acq.start();
}
try {
m_cam.start();
} catch (...) {
m_acq.stop();
if (acq_start)
m_acq.stop();
throw;
}
}
......
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