Commit 56b4036c authored by Sebastien Petitdemange's avatar Sebastien Petitdemange Committed by Laurent Claustre

set timing between max and min valid ranges

parent 134f2791
......@@ -142,7 +142,7 @@ namespace lima
void _setDefaultPars(Parameters* pars);
void _apply();
void _hwRead();
void _check_timing_ranges();
#ifdef WITH_CONFIG
class _ConfigHandler;
CtConfig::ModuleTypeCallback* _getConfigHandler();
......
......@@ -55,6 +55,7 @@ public:
DEB_PARAM() << DEB_VAR1(ranges);
m_acq.m_valid_ranges = ranges;
m_acq._check_timing_ranges();
}
private:
CtAcquisition& m_acq;
......@@ -180,6 +181,22 @@ void CtAcquisition::reset()
//Check auto exposure capability
m_inpars.autoExpoMode =
m_hw_sync->checkAutoExposureMode(HwSyncCtrlObj::OFF) ? OFF : ON;
_check_timing_ranges();
}
void CtAcquisition::_check_timing_ranges()
{
//Set exposure time and accumulation time in valide ranges
if(m_inpars.acqExpoTime < m_valid_ranges.min_exp_time)
m_inpars.acqExpoTime = m_valid_ranges.min_exp_time;
else if(m_inpars.acqExpoTime > m_valid_ranges.max_exp_time)
m_inpars.acqExpoTime = m_valid_ranges.max_exp_time;
if(m_inpars.accMaxExpoTime < m_valid_ranges.min_exp_time)
m_inpars.accMaxExpoTime = m_valid_ranges.min_exp_time;
else if(m_inpars.accMaxExpoTime > m_valid_ranges.max_exp_time)
m_inpars.accMaxExpoTime = m_valid_ranges.max_exp_time;
}
void CtAcquisition::apply(CtControl::ApplyPolicy policy)
......
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