update with changes made in cmake-test (code & cmake)

parent a3538c9b
Pipeline #14390 passed with stages
in 15 minutes and 6 seconds
......@@ -114,7 +114,7 @@ Standard: Cpp11
StatementMacros:
- Q_UNUSED
- QT_REQUIRE_VERSION
TabWidth: 8
TabWidth: 4
UseTab: Never
...
......@@ -62,7 +62,7 @@ include(LimaTools)
include(project_version)
# Enable git hash in the version
option(WITH_GIT_VERSION "compile python binding code?" OFF)
option(WITH_GIT_VERSION "include the git commit hash" OFF)
# Enable python binding code compilation using sip generator
if (CAMERA_MASTER_PROJECT)
......@@ -143,7 +143,7 @@ target_link_libraries(pco PUBLIC limacore)
target_compile_definitions(pco PUBLIC ${PCO_DEFINITIONS})
message("PCO_INCLUDE_DIRS: ${PCO_INCLUDE_DIRS}")
message("... PCO_INCLUDE_DIRS: ${PCO_INCLUDE_DIRS}")
target_include_directories(pco
PUBLIC "$<BUILD_INTERFACE:${PCO_INCLUDE_DIRS}>"
......@@ -197,6 +197,8 @@ install(
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
)
message("... LIMA_ENABLE_PYTHON: [${LIMA_ENABLE_PYTHON}]")
message("... PYTHON_SITE_PACKAGES_DIR: [${PYTHON_SITE_PACKAGES_DIR}]")
if(LIMA_ENABLE_PYTHON)
install(
DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/python/
......
......@@ -31,6 +31,9 @@ set(PCO_SDKLIN_DIR "${CMAKE_CURRENT_SOURCE_DIR}/sdkPcoLin" CACHE PATH "location
if(WIN32)
find_path(PCO_INCLUDE_DIRS "PcoSdkVersion.h" ${PCO_SDKWIN_DIR})
list(APPEND PCO_INCLUDE_DIRS
${PCO_INCLUDE_DIRS}/include
)
find_library(PCO_LIBRARIES NAMES SC2_Cam.lib HINTS ${PCO_SDKWIN_DIR}/lib64)
else()
set(PCO_SDK_LIB_DIR "${PCO_SDKLIN_DIR}/pco_common/pco_lib" CACHE PATH "location of pco sdklib-lin")
......@@ -74,10 +77,10 @@ list(APPEND PCO_INCLUDE_DIRS
endif()
message("PCO_LIBRARIES ============================================")
message("PCO_INCLUDE_DIRS: ${PCO_INCLUDE_DIRS}")
message("PCO_LIBRARIES: ${PCO_LIBRARIES}")
message("==========================================================")
message("PCO_INCLUDE_DIRS: [${PCO_INCLUDE_DIRS}]")
message("PCO_LIBRARIES: [${PCO_LIBRARIES}]")
message("PCO_DEFINITIONS: [${PCO_DEFINITIONS}]")
message("==========================================================")
include(FindPackageHandleStandardArgs)
......
#from Lima import Core
#from limapco import *
#from Lima import Core
from limapco import Pco as _P
globals().update(_P.__dict__)
This diff is collapsed.
......@@ -77,38 +77,37 @@ const char *_timestamp_pcocamera()
}
#ifdef WITH_GIT_VERSION
#include "PcoGitVersion.h"
# include "PcoGitVersion.h"
char * _timestamp_gitversion(char *buffVersion, int len)
char *_timestamp_gitversion(char *buffVersion, int len)
{
__sprintfSExt(buffVersion, len,
#ifdef PCO_GIT_VERSION
PCO_GIT_VERSION "\n"
#endif
#ifdef PCO_SDK_VERSION
PCO_SDK_VERSION "\n"
#endif
#ifdef PROCLIB_GIT_VERSION
PROCLIB_GIT_VERSION "\n"
#endif
#ifdef LIBCONFIG_GIT_VERSION
LIBCONFIG_GIT_VERSION "\n"
#endif
#ifdef LIMA_GIT_VERSION
LIMA_GIT_VERSION "\n"
#endif
#ifdef TANGO_GIT_VERSION
TANGO_GIT_VERSION "\n"
#endif
#ifdef SPEC_GIT_VERSION
SPEC_GIT_VERSION "\n"
#endif
"\n");
return buffVersion;
__sprintfSExt(buffVersion, len,
# ifdef PCO_GIT_VERSION
PCO_GIT_VERSION "\n"
# endif
# ifdef PCO_SDK_VERSION
PCO_SDK_VERSION "\n"
# endif
# ifdef PROCLIB_GIT_VERSION
PROCLIB_GIT_VERSION "\n"
# endif
# ifdef LIBCONFIG_GIT_VERSION
LIBCONFIG_GIT_VERSION "\n"
# endif
# ifdef LIMA_GIT_VERSION
LIMA_GIT_VERSION "\n"
# endif
# ifdef TANGO_GIT_VERSION
TANGO_GIT_VERSION "\n"
# endif
# ifdef SPEC_GIT_VERSION
SPEC_GIT_VERSION "\n"
# endif
"\n");
return buffVersion;
}
#endif
//=========================================================================================================
//=========================================================================================================
......@@ -1141,10 +1140,20 @@ void Camera::prepareAcq()
//==========================================================================================================
const char *sPcoAcqStatus[] = {
"pcoAcqIdle", "pcoAcqStart", "pcoAcqRecordStart",
"pcoAcqRecordEnd", "pcoAcqTransferStart", "pcoAcqTransferEnd",
"pcoAcqStop", "pcoAcqTransferStop", "pcoAcqRecordTimeout",
"pcoAcqWaitTimeout", "pcoAcqWaitError", "pcoAcqError",
"pcoAcqOK",
"pcoAcqIdle",
"pcoAcqStart",
"pcoAcqRecordStart",
"pcoAcqRecordEnd",
"pcoAcqRecordStop",
"pcoAcqRecordTimeout",
"pcoAcqTransferStart",
"pcoAcqTransferEnd",
"pcoAcqStop",
"pcoAcqTransferStop",
"pcoAcqWaitTimeout",
"pcoAcqWaitError",
"pcoAcqError",
"pcoAcqPcoError",
};
......
......@@ -351,7 +351,13 @@ const char *Camera::_pco_SetRecordingState(int state, int &err)
usElapsedTimeSet(usStart);
#endif
// if(wRecState_new == wRecState_actual) {error = 0; return fnId; }
if (wRecState_new == wRecState_actual)
{
DEB_TRACE() << " SetRecordingState - BYPASSED "
<< DEB_VAR2(wRecState_new, wRecState_actual);
err = 0;
return fnId;
}
// ------------------------------------------ cancel images
if (wRecState_new == 0)
......
......@@ -1075,8 +1075,6 @@ void Camera::getGeneralCAPS1(std::string &o_sn)
dwGeneralCaps1 = m_pcoData->stcPcoDescription.dwGeneralCaps1;
#endif
int nib[8];
int i, j;
......
......@@ -168,7 +168,7 @@ time_t getTimestamp()
//(..\..\..\..\src\PcoCamera.cpp) $
#define LEN_BUFF_DATE 128
#define LEN_BUFF_PATH PATH_MAX // 260 in win
#define LEN_BUFF_PATH PATH_MAX // 260 in win
#define TOKNR_DT 5
int __xlat_date(char *s1, char &ptrTo, int lenTo)
......@@ -2419,7 +2419,7 @@ void print_hex_dump_buff(void *ptr_buff, size_t len)
BYTE *ptr = (BYTE *)ptr_buff;
;
//printf("dump buff / len: %ld\n", len);
// printf("dump buff / len: %ld\n", len);
printf("dump buff / len: %zd\n", len);
while (len > 0)
......
......@@ -406,11 +406,11 @@ void _pco_acq_thread_dimax(void *argin)
m_sync->setStarted(false);
#if 0
if(requestStop == stopRequest)
{
Event *ev = new Event(Hardware,Event::Error,Event::Camera,Event::CamFault, errMsg);
m_cam->_getPcoHwEventCtrlObj()->reportEvent(ev);
}
if (requestStop == stopRequest)
{
Event* ev = new Event(Hardware, Event::Error, Event::Camera, Event::CamFault, errMsg);
m_cam->_getPcoHwEventCtrlObj()->reportEvent(ev);
}
#endif
......@@ -636,11 +636,11 @@ void _pco_acq_thread_dimax_trig_single(void *argin)
m_sync->setStarted(false);
#if 0
if(requestStop == stopRequest)
{
Event *ev = new Event(Hardware,Event::Error,Event::Camera,Event::CamFault, errMsg);
m_cam->_getPcoHwEventCtrlObj()->reportEvent(ev);
}
if (requestStop == stopRequest)
{
Event* ev = new Event(Hardware, Event::Error, Event::Camera, Event::CamFault, errMsg);
m_cam->_getPcoHwEventCtrlObj()->reportEvent(ev);
}
#endif
......@@ -689,6 +689,9 @@ void _pco_acq_thread_edge(void *argin)
m_sync->setExposing(status);
// m_sync->stopAcq();
printf("=== %s [%d]> _pco_SetRecordingState(0)\n", fnId, __LINE__);
const char *msg = m_cam->_pco_SetRecordingState(0, error);
if (error)
{
......@@ -726,15 +729,18 @@ void _pco_acq_thread_edge(void *argin)
case pcoAcqPcoError:
errMsg = "pcoAcqPcoError";
break;
default:
errMsg = NULL;
}
if (errMsg)
if (errMsg != NULL)
{
Event *ev = new Event(Hardware, Event::Error, Event::Camera,
Event::CamFault, errMsg);
m_cam->_getPcoHwEventCtrlObj()->reportEvent(ev);
}
printf("=== %s [%d]> TRACE %s\n", fnId, __LINE__, "exit thread");
_endthread();
}
......@@ -1066,19 +1072,19 @@ void Camera::startAcq()
_beginthread(_pco_acq_thread_edge, 0, (void *)this);
#if 0
AutoMutex lock(m_cond.mutex());
bool resWait;
int retry = 3;
int val, val0; val0 = pcoAcqRecordStart;
while( ((val = m_sync->getExposing()) != val0) && retry--)
{
DEB_TRACE() << "+++ getExposing / pcoAcqRecordStart - WAIT - " << DEB_VAR3(val, val0, retry);
resWait = m_cond.wait(2.);
}
DEB_TRACE() << "+++ getExposing / pcoAcqRecordStart - EXIT - " << DEB_VAR3(val, val0, retry);
lock.unlock();
AutoMutex lock(m_cond.mutex());
bool resWait;
int retry = 3;
int val, val0; val0 = pcoAcqRecordStart;
while (((val = m_sync->getExposing()) != val0) && retry--)
{
DEB_TRACE() << "+++ getExposing / pcoAcqRecordStart - WAIT - " << DEB_VAR3(val, val0, retry);
resWait = m_cond.wait(2.);
}
DEB_TRACE() << "+++ getExposing / pcoAcqRecordStart - EXIT - " << DEB_VAR3(val, val0, retry);
lock.unlock();
#endif
m_pcoData->traceAcq.msStartAcqEnd = msElapsedTime(tStart);
......@@ -1086,11 +1092,11 @@ void Camera::startAcq()
}
#if 0
if(_isCameraType(Pco2k | Pco4k)){
_beginthread( _pco_acq_thread_ringBuffer, 0, (void*) this);
m_pcoData->traceAcq.msStartAcqEnd = msElapsedTime(tStart);
return;
}
if (_isCameraType(Pco2k | Pco4k)) {
_beginthread(_pco_acq_thread_ringBuffer, 0, (void*)this);
m_pcoData->traceAcq.msStartAcqEnd = msElapsedTime(tStart);
return;
}
#endif
if (_isCameraType(Dimax | Pco2k | Pco4k))
......
......@@ -611,7 +611,8 @@ void SyncCtrlObj::getStatus(HwInterface::StatusType &status)
case pcoAcqRecordEnd:
case pcoAcqTransferStart:
status.acq = AcqRunning;
status.det = DetIdle;
// status.det = DetIdle;
status.det = DetLatency;
break;
case pcoAcqRecordStop:
......
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