Commit 01b81653 authored by Alejandro Homs Puron's avatar Alejandro Homs Puron

* Moved Frelon initialisation commands to Interface/FrelonAcq resetDefaults,

  defaults settings are applied on standard reset only if HardReset requested
parent 61f571ed
......@@ -364,6 +364,8 @@ class Interface : public HwInterface
virtual void getStatus(StatusType& status);
virtual int getNbHwAcquiredFrames();
void resetDefaults();
private:
Espia::Acq& m_acq;
BufferCtrlMgr& m_buffer_mgr;
......
......@@ -224,6 +224,13 @@ class FrelonAcq:
deb.Trace('Reseting the device!')
self.m_ct.reset()
@DEB_MEMBER_FUNCT
def resetDefaults(self):
deb.Trace('Reseting to default settings')
self.m_hw_inter.resetDefaults()
deb.Trace('Forcing Control Layer to synchronise')
self.reset()
@DEB_MEMBER_FUNCT
def getCameraModel(self):
model = self.m_cam.getModel()
......
......@@ -315,6 +315,8 @@ class Interface : HwInterface
virtual void getStatus(HwInterface::StatusType& status /Out/);
virtual int getNbHwAcquiredFrames();
void resetDefaults();
SIP_PYOBJECT getHwCtrlObj(HwCap::Type cap_type);
%MethodCode
HwInterface::CapList cap_list;
......
......@@ -815,6 +815,7 @@ Interface::Interface(Espia::Acq& acq, BufferCtrlMgr& buffer_mgr,
m_cap_list.push_back(HwCap(event));
reset(SoftReset);
resetDefaults();
}
Interface::~Interface()
......@@ -838,7 +839,17 @@ void Interface::reset(ResetLevel reset_level)
if (reset_level == HardReset) {
DEB_TRACE() << "Performing camera hard reset";
m_cam.hardReset();
resetDefaults();
}
}
void Interface::resetDefaults()
{
DEB_MEMBER_FUNCT();
DEB_TRACE() << "Setting default configuration";
stopAcq();
m_cam.setFrameTransferMode(FFM);
InputChan input_chan;
......
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