Commit 75646aef authored by ahoms's avatar ahoms

* fixed non-inited m_fout iostate crashing CtSaving::_SaveContainer::_open()

* fixed race condition in CtControl::getStatus between hw ready & newFrameReady
* fixed CtControl::newFrameReady not propagating event if not soft. tasks
* always sync to hw in CtHwBinRoi setBin/Roi to ensure proper hw calculations
* fixed [Frelon]TacoCcd set/getFilePar and InputChan
* reduced overhead calling Frelon::Camera::getInputChan in isChanActive
* fixed Frelon::Camera::getImageRoiOffset not taking into account curr. bin



git-svn-id: https://scm.blissgarden.org/svn/lima/trunk@206 45c4679d-1946-429d-baad-37912b19538b
parent 829f6e29
......@@ -40,7 +40,7 @@ class Camera : public HwMaxImageSizeCallbackGen
void getFrameDim(FrameDim& frame_dim);
bool isChanActive(InputChan chan);
bool isChanActive(InputChan curr, InputChan chan);
void checkFlip(Flip& flip);
void setFlip(const Flip& flip);
......@@ -126,11 +126,9 @@ class Camera : public HwMaxImageSizeCallbackGen
bool m_mis_cb_act;
};
inline bool Camera::isChanActive(InputChan chan)
inline bool Camera::isChanActive(InputChan curr, InputChan chan)
{
InputChan curr_chan;
getInputChan(curr_chan);
return (curr_chan & chan) == chan;
return (curr & chan) == chan;
};
......
......@@ -428,8 +428,10 @@ void Camera::getRoiMode(RoiMode& roi_mode)
void Camera::getMirror(Point& mirror)
{
DEB_MEMBER_FUNCT();
mirror.x = isChanActive(Chan12) || isChanActive(Chan34);
mirror.y = isChanActive(Chan13) || isChanActive(Chan24);
InputChan curr;
getInputChan(curr);
mirror.x = isChanActive(curr, Chan12) || isChanActive(curr, Chan34);
mirror.y = isChanActive(curr, Chan13) || isChanActive(curr, Chan24);
DEB_RETURN() << DEB_VAR1(mirror);
}
......@@ -473,9 +475,11 @@ void Camera::xformChanCoords(const Point& point, Point& chan_point,
Size chan_size;
getChanSize(chan_size);
Flip readout_flip;
readout_flip.x = !(isChanActive(Chan1) || isChanActive(Chan3));
readout_flip.y = !(isChanActive(Chan1) || isChanActive(Chan2));
InputChan curr;
getInputChan(curr);
bool right = !isChanActive(curr, Chan1) && !isChanActive(curr, Chan3);
bool bottom = !isChanActive(curr, Chan1) && !isChanActive(curr, Chan2);
Flip readout_flip(right, bottom);
DEB_TRACE() << DEB_VAR2(chan_flip, readout_flip);
Flip effect_flip = chan_flip & readout_flip;
......@@ -579,6 +583,10 @@ void Camera::getImageRoiOffset(const Roi& req_roi, const Roi& image_roi,
Size ccd_size, image_size;
getCcdSize(ccd_size);
Bin bin;
getBin(bin);
ccd_size /= bin;
image_size = image_roi.getSize();
Point image_br = image_roi.getBottomRight() + 1;
......
......@@ -148,7 +148,7 @@ void test_frelon(bool do_reset)
string sep = "";
for (int i = 0; i < 4; i++) {
Frelon::InputChan chan = Frelon::InputChan(1 << i);
if (frelon_cam.isChanActive(chan)) {
if (frelon_cam.isChanActive(input_chan, chan)) {
cout << sep << (i + 1);
sep = "&";
}
......
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