[wip] minor / sync lin

parent 52993370
......@@ -816,8 +816,9 @@ namespace lima
bool _getCameraState(long long flag);
void _setCameraState(long long flag, bool val);
#ifndef __linux__
bool _isRunAfterAssign();
#endif
bool _isCapsDesc(int caps);
void _pco_GetAcqEnblSignalStatus(WORD &wAcquEnableState, int &err);
......@@ -951,6 +952,7 @@ namespace lima
double pcoGetCocRunTime();
double pcoGetFrameRate();
void _pco_GetCameraMinSizeCalc(WORD& wMinSizeHorz, WORD& wMinSizeVert);
void _pco_GetCOCRuntime(int &err);
......@@ -1064,14 +1066,20 @@ void _pco_time2dwbase(double exp_time, DWORD &dwExp, WORD &wBase);
int PCO_GetActiveRamSegment(HANDLE ph, WORD *);
int PCO_GetActiveLookupTable(HANDLE ph, WORD *wIdentifier, WORD *wParameter);
int PCO_SetActiveLookupTable(HANDLE ph, WORD *wIdentifier, WORD *wParameter);
int PCO_CamLinkSetImageParameters(HANDLE ph, WORD wxres, WORD wyres);
int PCO_CamLinkSetImageParameters(HANDLE ph, WORD wxres, WORD wyres);
#endif
long msElapsedTime(TIME_USEC &t0);
void msElapsedTimeSet(TIME_USEC &t0);
void usElapsedTimeSet(TIME_UTICKS &tick0) ;
long long usElapsedTime(TIME_UTICKS &tick0) ;
double usElapsedTimeTicsPerSec() ;
enum traceAcqId {traceAcq_execTimeTot, };
int image_nr_from_timestamp(void *buf,int shift, bool bDisable);
#endif
#endif
#endif
\ No newline at end of file
......@@ -521,6 +521,8 @@ if(wDoubleImage)
//===================================================================================================================
int BufferCtrlObj::_xferImag()
{
#ifndef __linux__
DEB_MEMBER_FUNCT();
DEF_FNID;
......@@ -946,7 +948,7 @@ _EXIT_STOP:
m_pcoData->traceAcq.endXferTimestamp = getTimestamp();
return pcoAcqTransferStop;
#endif
}
......@@ -1263,6 +1265,7 @@ int BufferCtrlObj::_xferImag_getImage()
int BufferCtrlObj::_xferImag_getImage_edge()
{
#ifndef __linux__
DEB_MEMBER_FUNCT();
DEF_FNID;
......@@ -1489,7 +1492,7 @@ int BufferCtrlObj::_xferImag_getImage_edge()
DEB_TRACE() << DEB_VAR3(_retStatus, _stopReq, _newFrameReady);
return _retStatus;
#endif
}
......@@ -1789,6 +1792,7 @@ int BufferCtrlObj::_xferImagMult()
// called by startAcq
void BufferCtrlObj::_pcoAllocBuffers(bool max) {
#ifndef __linux__
DEB_MEMBER_FUNCT();
DEF_FNID;
......@@ -1904,6 +1908,8 @@ void BufferCtrlObj::_pcoAllocBuffers(bool max) {
}
}
#endif
}
//===================================================================================================================
......@@ -1986,6 +1992,8 @@ void BufferCtrlObj::_pcoAllocBuffersFree() {
//===================================================================================================================
int BufferCtrlObj::_xferImagDoubleImage()
{
#ifndef __linux__
DEB_MEMBER_FUNCT();
DEF_FNID;
......@@ -2410,7 +2418,7 @@ _EXIT_STOP:
m_pcoData->traceAcq.endXferTimestamp = getTimestamp();
return pcoAcqTransferStop;
#endif
}
......
......@@ -479,7 +479,7 @@ int Camera::_pco_SetBitAlignment(int alignment){
error = PCO_CHECK_ERROR(error, "PCO_SetBitAlignment");
#else
error=camera->PCO_SetBitAlignment(wBitAlignment);
msg = "PCO_SetBitAlignment" ; PCO_CHECK_ERROR(error, msg);
char *msg = "PCO_SetBitAlignment" ; PCO_CHECK_ERROR(error, msg);
PCO_THROW_OR_TRACE(error, msg) ;
#endif
......@@ -2893,18 +2893,23 @@ void Camera::getXYdescription(unsigned int &xSteps, unsigned int &ySteps, unsign
#ifndef __linux__
xMinSize = xMinSize0 = m_pcoData->stcPcoDescription.wMinSizeHorzDESC;
yMinSize = m_pcoData->stcPcoDescription.wMinSizeVertDESC;
#else
xMinSize = xMinSize0 = m_pcoData->stcPcoDescription.wRoiHorStepsDESC;
yMinSize = m_pcoData->stcPcoDescription.wRoiVertStepsDESC;
#endif
{ // patch meanwhile firmware 1.19 is fixed
if(m_pcoData->params_xMinSize) {
if(m_pcoData->params_xMinSize)
{
xMinSize += xSteps;
DEB_TRACE() << "PATCH APPLIED: " << DEB_VAR2(xMinSize0, xMinSize);
}
}
#else
//xMinSize = xMinSize0 = m_pcoData->stcPcoDescription.wRoiHorStepsDESC;
//yMinSize = m_pcoData->stcPcoDescription.wRoiVertStepsDESC;
WORD wXMinSize, wYMinSize;
_pco_GetCameraMinSizeCalc(wXMinSize, wYMinSize);
xMinSize = wXMinSize;
yMinSize = wYMinSize;
#endif
}
void Camera::getXYsteps(unsigned int &xSteps, unsigned int &ySteps){
......@@ -3916,3 +3921,79 @@ void Camera::_pco_GetCameraTypeOnly(int &err)
#endif
}
//=================================================================================================
//=================================================================================================
void Camera::_pco_GetCameraMinSizeCalc(WORD& wMinSizeHorz, WORD& wMinSizeVert)
{
DEB_MEMBER_FUNCT();
DEF_FNID;
unsigned int uiHorzSteps, uiVertSteps;
getXYsteps(uiHorzSteps, uiVertSteps);
WORD wHorzSteps = uiHorzSteps;
WORD wVertSteps = uiVertSteps;
WORD wh = _getCameraType();
if((wh == CAMERATYPE_PCO_EDGE) ||
(wh == CAMERATYPE_PCO_EDGE_GL) ||
(wh == CAMERATYPE_PCO_EDGE_42) ||
(wh == CAMERATYPE_PCO_EDGE_USB3) ||
(wh == CAMERATYPE_PCO_EDGE_HS))
{
wMinSizeHorz = wHorzSteps;
wMinSizeVert = wVertSteps;
if(wMinSizeHorz < 160)
wMinSizeHorz = 160; // due to camera limitation
if(wMinSizeVert < 16)
wMinSizeVert = 16;
if(wh == CAMERATYPE_PCO_EDGE_42)
{
wMinSizeHorz = 40; // due to camera limitation
wMinSizeVert = 16;
}
if ((wh == CAMERATYPE_PCO_EDGE_USB3) ||
(wh == CAMERATYPE_PCO_EDGE_HS))
{
wMinSizeVert = 16;
wMinSizeHorz = 64; // due to camera limitation
}
}
else
{
wMinSizeHorz = wHorzSteps * 2;
wMinSizeVert = wVertSteps * 2;
if(wMinSizeHorz < 8)
wMinSizeHorz = 8;
if(wMinSizeVert < 8)
wMinSizeVert = 8;
}
if(wHorzSteps > 1)
{
int k = (wMinSizeHorz) % wHorzSteps;
if(k > 0)
{
k++;
wMinSizeHorz = wHorzSteps * k;
}
}
if(wVertSteps > 1)
{
int k = (wMinSizeVert) % wVertSteps;
if(k > 0)
{
k++;
wMinSizeVert = wVertSteps * k;
}
}
DEB_ALWAYS() << DEB_VAR4(wMinSizeHorz, wMinSizeVert, wHorzSteps, wVertSteps);
}
......@@ -181,14 +181,17 @@ char *_split_date(const char *s) {
ptr1 = strchr(s,'[');
ptr2 = strchr(ptr1,']');
strncpy_s4(s1, LEN_BUFF_DATE, ptr1+1, ptr2-ptr1-1);
s1[ptr2-ptr1-1] = 0;
ptr1 = strchr(ptr2,'[');
ptr2 = strchr(ptr1,']');
strncpy_s4(s2, LEN_BUFF_DATE, ptr1+1, ptr2-ptr1-1);
s2[ptr2-ptr1-1] = 0;
ptr1 = strchr(ptr2,'[');
ptr2 = strchr(ptr1,']');
strncpy_s4(s3, LEN_BUFF_DATE, ptr1+1, ptr2-ptr1-1);
s3[ptr2-ptr1-1] = 0;
return _xlat_date(s1, s2, s3);
}
......@@ -2905,4 +2908,3 @@ void Camera::getRollingShutterInfo(std::string &o_sn)
o_sn = buff;
return;
}
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