Commit eb6ea66b authored by Alejandro Homs Puron's avatar Alejandro Homs Puron

* Added "shut_" prefix to HwShutterCtrlObj methods' args

* Implemented SIP retrieval of HwShutterCtrlObj from HwInterface
parent b409c357
......@@ -217,12 +217,12 @@ public:
ShutterCtrlObj(Camera& cam);
virtual ~ShutterCtrlObj();
virtual bool checkMode(Mode mode);
virtual void setMode(Mode mode);
virtual void getMode(Mode& mode);
virtual bool checkMode(Mode shut_mode);
virtual void setMode(Mode shut_mode);
virtual void getMode(Mode& shut_mode);
virtual void setState(bool open);
virtual void getState(bool& open);
virtual void setState(bool shut_open);
virtual void getState(bool& shut_open);
virtual void setOpenTime (double shut_open_time);
virtual void getOpenTime (double& shut_open_time);
......
......@@ -171,12 +171,12 @@ public:
ShutterCtrlObj(Frelon::Camera& cam);
virtual ~ShutterCtrlObj();
virtual bool checkMode(Mode mode);
virtual void setMode(Mode mode);
virtual void getMode(Mode& mode /Out/);
virtual bool checkMode(Mode shut_mode);
virtual void setMode(Mode shut_mode);
virtual void getMode(Mode& shut_mode /Out/);
virtual void setState(bool open);
virtual void getState(bool& open /Out/);
virtual void setState(bool shut_open);
virtual void getState(bool& shut_open /Out/);
virtual void setOpenTime (double shut_open_time);
virtual void getOpenTime (double& shut_open_time /Out/);
......
......@@ -466,13 +466,13 @@ ShutterCtrlObj::~ShutterCtrlObj()
DEB_DESTRUCTOR();
}
bool ShutterCtrlObj::checkMode(Mode mode)
bool ShutterCtrlObj::checkMode(Mode shut_mode)
{
DEB_MEMBER_FUNCT();
DEB_PARAM() << DEB_VAR1(mode);
DEB_PARAM() << DEB_VAR1(shut_mode);
bool valid_mode;
switch (mode) {
switch (shut_mode) {
case Manual:
case AutoFrame:
valid_mode = true;
......@@ -485,27 +485,28 @@ bool ShutterCtrlObj::checkMode(Mode mode)
return valid_mode;
}
void ShutterCtrlObj::setMode(Mode mode)
void ShutterCtrlObj::setMode(Mode shut_mode)
{
DEB_MEMBER_FUNCT();
DEB_PARAM() << DEB_VAR1(mode);
DEB_PARAM() << DEB_VAR1(shut_mode);
if (!checkMode(mode))
THROW_HW_ERROR(InvalidValue) << "Invalid " << DEB_VAR1(mode);
if (!checkMode(shut_mode))
THROW_HW_ERROR(InvalidValue) << "Invalid "
<< DEB_VAR1(shut_mode);
ShutMode cam_mode;
cam_mode = (mode == AutoFrame) ? Frelon::AutoFrame : Frelon::Off;
cam_mode = (shut_mode == AutoFrame) ? Frelon::AutoFrame : Frelon::Off;
m_cam.setShutMode(cam_mode);
}
void ShutterCtrlObj::getMode(Mode& mode)
void ShutterCtrlObj::getMode(Mode& shut_mode)
{
DEB_MEMBER_FUNCT();
ShutMode cam_mode;
m_cam.getShutMode(cam_mode);
mode = (cam_mode == Frelon::AutoFrame) ? AutoFrame : Manual;
DEB_RETURN() << DEB_VAR1(mode);
shut_mode = (cam_mode == Frelon::AutoFrame) ? AutoFrame : Manual;
DEB_RETURN() << DEB_VAR1(shut_mode);
}
void ShutterCtrlObj::setState(bool open)
......@@ -516,7 +517,7 @@ void ShutterCtrlObj::setState(bool open)
Mode mode;
getMode(mode);
if (mode != Manual)
THROW_HW_ERROR(NotSupported) << "Not in manual mode";
THROW_HW_ERROR(NotSupported) << "Not in manual shutter mode";
else if (open)
THROW_HW_ERROR(NotSupported) << "Manual shutter open "
"not supported";
......@@ -529,7 +530,7 @@ void ShutterCtrlObj::getState(bool& open)
Mode mode;
getMode(mode);
if (mode != Manual)
THROW_HW_ERROR(NotSupported) << "Not in manual mode";
THROW_HW_ERROR(NotSupported) << "Not in manual shutter mode";
open = false;
DEB_RETURN() << DEB_VAR1(open);
......
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