fixed little bug with Hard binning

parent bc9231fc
......@@ -113,6 +113,7 @@ class Camera
void setRoi(const Roi& set_roi);
void getRoi(Roi& hw_roi);
void checkBin(Bin&);
void setBin(const Bin&);
void getBin(Bin&);
......
......@@ -128,7 +128,7 @@ class BinCtrlObj : public HwBinCtrlObj
virtual void setBin(const Bin& bin);
virtual void getBin(Bin& bin);
//allow all binning
virtual void checkBin(Bin& bin) {}
virtual void checkBin(Bin& bin);
private:
Camera& m_cam;
......
......@@ -46,6 +46,7 @@ namespace Basler
void setRoi(const Roi& set_roi);
void getRoi(Roi& hw_roi /Out/);
void checkBin(Bin& /In,Out/);
void setBin(const Bin&);
void getBin(Bin& /Out/);
......
......@@ -1002,6 +1002,23 @@ void Camera::getRoi(Roi& hw_roi)
DEB_RETURN() << DEB_VAR1(hw_roi);
}
//-----------------------------------------------------
//
//-----------------------------------------------------
void Camera::checkBin(Bin &aBin)
{
DEB_MEMBER_FUNCT();
int x = aBin.getX();
if(x > Camera_->BinningHorizontal.GetMax())
x = Camera_->BinningHorizontal.GetMax();
int y = aBin.getY();
if(y > Camera_->BinningVertical.GetMax())
y = Camera_->BinningVertical.GetMax();
aBin = Bin(x,y);
DEB_RETURN() << DEB_VAR1(aBin);
}
//-----------------------------------------------------
//
//-----------------------------------------------------
......
......@@ -312,6 +312,10 @@ void BinCtrlObj::getBin(Bin &aBin)
m_cam.getBin(aBin);
}
void BinCtrlObj::checkBin(Bin &aBin)
{
m_cam.checkBin(aBin);
}
/*******************************************************************
* \brief Hw Interface constructor
*******************************************************************/
......
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