Commit 0121e95a authored by Laurent Claustre's avatar Laurent Claustre

Fixed an inconsistency for scientific (monochrome) camera between...

Fixed an inconsistency for scientific (monochrome) camera between getSupportedVideoMode() and getMode().
parent 29746d5a
......@@ -132,7 +132,7 @@ namespace lima
void unregisterImageCallback(ImageCallback &cb);
// --- video mode
void getSupportedVideoMode(std::list<VideoMode> &modeList);
void getSupportedVideoMode(std::list<VideoMode> &modeList) const;
private:
class _Data2ImageCBK;
friend class _Data2ImageCBK;
......
......@@ -147,7 +147,7 @@ using namespace lima;
void unregisterImageCallback(CtVideo::ImageCallback &cb);
// --- video mode
void getSupportedVideoMode(std::list<VideoMode> &modeList /Out/);
void getSupportedVideoMode(std::list<VideoMode> &modeList /Out/) const;
};
%MappedType CtVideo::AutoGainModeList
......
......@@ -680,7 +680,14 @@ void CtVideo::setMode(VideoMode aMode)
void CtVideo::getMode(VideoMode &aMode) const
{
AutoMutex aLock(m_cond.mutex());
aMode = m_pars.mode;
if(m_has_video)
aMode = m_pars.mode;
else
{
std::list<VideoMode> modeList;
getSupportedVideoMode(modeList);
aMode = modeList.front();
}
}
void CtVideo::setRoi(const Roi &aRoi)
......@@ -769,7 +776,7 @@ void CtVideo::unregisterImageCallback(ImageCallback &cb)
}
// --- video mode
void CtVideo::getSupportedVideoMode(std::list<VideoMode> &modeList)
void CtVideo::getSupportedVideoMode(std::list<VideoMode> &modeList) const
{
DEB_MEMBER_FUNCT();
......
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