Commit 3d3f8aed authored by nfoy's avatar nfoy
Browse files

Merge branch 'integration-1.2' of...

Merge branch 'integration-1.2' of git+ssh://scm.gforge.inria.fr/gitroot/openvibe/openvibe into integration-1.2
parents 7dc4cd0c 6ba99bf6
......@@ -41,7 +41,9 @@ IF(WIN32)
SET(OV_OMP_WAIT_POLICY "PASSIVE")
# Disable /MP if you don't like VS using all the cores for compilation
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4355 /MP ${OV_EIGEN_FLAGS}")
ADD_DEFINITIONS("-DNOMINMAX -DBOOST_ALL_NO_LIB")
ADD_DEFINITIONS("-DNOMINMAX -DBOOST_ALL_NO_LIB")
# At least Windows Vista target - if you target Windows XP (0x0501), some components may not compile
ADD_DEFINITIONS("-D_WIN32_WINNT=0x0600")
# Find out the compiler version, deps may use this
IF(${CMAKE_MAJOR_VERSION} LESS 3)
......@@ -62,8 +64,11 @@ IF(WIN32)
ENDIF(${CMAKE_MAJOR_VERSION} LESS 3)
STRING(REGEX MATCH "vc120.*" MSVC_VER120 ${MSVC_SERVICE_PACK})
IF(MSVC_VER120)
# If OpenMP is available, using it will allow Eigen to use multiple cores in matrix math. Only on VS120,
# as VS100 allocates the cores too aggressively when OpenMP is on.
# Boost 1.55 asio causes several compiler warnings on VS2013 we cannot do much about. try removing the following when boost is upgraded.
ADD_DEFINITIONS("-D_WINSOCK_DEPRECATED_NO_WARNINGS")
# If OpenMP is available, using it will allow Eigen to use multiple cores in matrix math. Only used on VS120,
# as VS100 allocates the cores too aggressively when OpenMP is enabled.
INCLUDE("FindOpenMP")
IF(OPENMP_FOUND)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
......
......@@ -8,12 +8,6 @@ SET(PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_
FILE(GLOB_RECURSE source_files src/*.cpp src/*.h src/*.inl)
ADD_EXECUTABLE(openvibe-stimulation-generator ${source_files})
if(UNIX)
SET(stim_generator_path "${CMAKE_CURRENT_BINARY_DIR}" CACHE INTERNAL "stim_generator_path")
else()
get_property(path_to_target TARGET openvibe-stimulation-generator PROPERTY LOCATION)
SET(stim_generator_path "${path_to_target}" CACHE INTERNAL "stim_generator_path")
endif()
# ---------------------------------
# Target macros
# Defines target operating system
......
......@@ -25,7 +25,8 @@ IF(WIN32)
INCLUDE_DIRECTORIES(${EEGOAPI_DIR})
INSTALL(PROGRAMS "${LIB_EEGOAPI}" DESTINATION "bin")
ADD_DEFINITIONS(-DTARGET_HAS_ThirdPartyEEGOAPI)
ADD_DEFINITIONS(-DEEGO_SDK_BIND_DYNAMIC)
MESSAGE(STATUS " [ OK ] lib ${LIB_EEGOAPI}")
ENDIF(WIN32)
......
......@@ -18,7 +18,6 @@
// The interface to the driver
// We have to setup the binding method and the unicode support first
#define EEGO_SDK_BIND_DYNAMIC
#define _UNICODE
#if defined(_MBCS) // Only unicode should be supported. Better stay away from MBCS methods!
#undef _MBCS
......
......@@ -7,7 +7,7 @@ SET(PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_
add_custom_command(OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/share/OV_stimulations.m
DEPENDS openvibe-stimulation-generator ${openvibe-toolkit_SOURCE_DIR}/share/stimulation_list.txt
COMMAND ${stim_generator_path}/openvibe-stimulation-generator
COMMAND openvibe-stimulation-generator
--matlab
${openvibe-toolkit_SOURCE_DIR}/share/stimulation_list.txt
${CMAKE_CURRENT_SOURCE_DIR}/share/OV_stimulations.m
......
......@@ -174,7 +174,8 @@ boolean CBoxAlgorithmSharedMemoryWriter::process(void)
{
for (uint32 si=0; si<l_pStimSet->getStimulationCount(); si++)
{
m_vStimuliSet[l_ui32StimulusInputCounter]->push_back(l_pStimSet->getStimulationIdentifier(si));
// @fixme m_vStimuliSet defined as 32bit will only work correctly with stimuli that fit in 32bits (OV stimulations can be 64bit)
m_vStimuliSet[l_ui32StimulusInputCounter]->push_back(static_cast<uint32>(l_pStimSet->getStimulationIdentifier(si)));
this->getLogManager() << LogLevel_Info << "Added stimulus with id " << m_vStimuliSet[l_ui32StimulusInputCounter]->back() << " to shared memory variable\n";
}
l_rDynamicBoxContext.markInputAsDeprecated(j,i);
......
......@@ -301,6 +301,13 @@ void CBufferDatabase::setMatrixDimensionSize(const uint32 ui32DimensionIndex, co
return;
}
if (m_pDimensionSizes[ui32DimensionIndex] != 0 && m_pDimensionSizes[ui32DimensionIndex] != ui32DimensionSize)
{
m_oParentPlugin.getBoxAlgorithmContext()->getPlayerContext()->getLogManager() << LogLevel_Error << "Upstream tried to change the data chunk size after the first header, this is not supported.\n";
m_bError = true;
return;
}
m_pDimensionSizes[ui32DimensionIndex] = ui32DimensionSize;
m_pDimensionLabels[ui32DimensionIndex].resize(ui32DimensionSize);
......@@ -315,6 +322,11 @@ void CBufferDatabase::setMatrixDimensionSize(const uint32 ui32DimensionIndex, co
void CBufferDatabase::setMatrixDimensionLabel(const uint32 ui32DimensionIndex, const uint32 ui32DimensionEntryIndex, const char* sDimensionLabel)
{
if (m_bError)
{
return;
}
if(ui32DimensionIndex>=2) {
m_bError = true;
m_oParentPlugin.getBoxAlgorithmContext()->getPlayerContext()->getLogManager() << LogLevel_Error << "Tried to access dimension " << ui32DimensionIndex << ", only 0 and 1 supported\n";
......
......@@ -10,7 +10,7 @@ SET(PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_
#We need to generate the stimulation files
add_custom_command(OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/include/toolkit/ovtk_stimulations.h ${CMAKE_CURRENT_SOURCE_DIR}/src/ovtk_stimulations.cpp
DEPENDS openvibe-stimulation-generator ${CMAKE_CURRENT_SOURCE_DIR}/share/stimulation_list.txt
COMMAND ${stim_generator_path}/openvibe-stimulation-generator
COMMAND openvibe-stimulation-generator
--cpp
${CMAKE_CURRENT_SOURCE_DIR}/share/stimulation_list.txt
${CMAKE_CURRENT_SOURCE_DIR}/include/toolkit/ovtk_stimulations.h
......
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