Fixing issues related to loading virtual sensors 99/51699/1
authorRamasamy <ram.kannan@samsung.com>
Thu, 12 Nov 2015 10:39:12 +0000 (19:39 +0900)
committerRamasamy <ram.kannan@samsung.com>
Thu, 12 Nov 2015 10:39:17 +0000 (19:39 +0900)
- fixing loader file for virtual sensors
- cleanup

Change-Id: Id290de293f8090a15790aaf94ee22e7aa6d93797

.gitignore [new file with mode: 0644]
src/server/plugins/CMakeLists.txt
src/server/plugins/sensor_module_create.cpp.in

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..47bd4b3
--- /dev/null
@@ -0,0 +1,2 @@
+.project
+.cproject
\ No newline at end of file
index 8ce6ea5..839e40c 100755 (executable)
@@ -73,56 +73,37 @@ ENDIF()
 IF("${ORIENTATION}" STREQUAL "ON")
 set(SENSOR_FUSION_ENABLE "1")
 set(ORIENTATION_ENABLE "1")
-add_definitions(-DENABLE_SENSOR_FUSION)
-add_definitions(-DENABLE_ORIENTATION)
 ENDIF()
 IF("${RV}" STREQUAL "ON")
 set(SENSOR_FUSION_ENABLE "1")
 set(RV_ENABLE "1")
-add_definitions(-DENABLE_SENSOR_FUSION)
-add_definitions(-DENABLE_RV)
 ENDIF()
 IF("${GEOMAGNETIC_RV}" STREQUAL "ON")
 set(SENSOR_FUSION_ENABLE "1")
 set(GEOMAGNETIC_RV_ENABLE "1")
-add_definitions(-DENABLE_SENSOR_FUSION)
-add_definitions(-DENABLE_GEOMAGNETIC_RV)
 ENDIF()
 IF("${GAMING_RV}" STREQUAL "ON")
 set(SENSOR_FUSION_ENABLE "1")
 set(GAMING_RV_ENABLE "1")
-add_definitions(-DENABLE_SENSOR_FUSION)
-add_definitions(-DENABLE_GAMING_RV)
 ENDIF()
 IF("${TILT}" STREQUAL "ON")
 set(SENSOR_FUSION_ENABLE "1")
 set(TILT_ENABLE "1")
-add_definitions(-DENABLE_SENSOR_FUSION)
-add_definitions(-DENABLE_TILT)
 ENDIF()
 IF("${UNCAL_GYRO}" STREQUAL "ON")
 set(SENSOR_FUSION_ENABLE "1")
 set(UNCAL_GYRO_ENABLE "1")
-add_definitions(-DENABLE_SENSOR_FUSION)
-add_definitions(-DENABLE_UNCAL_GYRO)
 ENDIF()
 IF("${GRAVITY}" STREQUAL "ON")
 set(SENSOR_FUSION_ENABLE "1")
 set(ORIENTATION_ENABLE "1")
 set(GRAVITY_ENABLE "1")
-add_definitions(-DENABLE_SENSOR_FUSION)
-add_definitions(-DENABLE_ORIENTATION)
-add_definitions(-DENABLE_GRAVITY)
 ENDIF()
 IF("${LINEAR_ACCEL}" STREQUAL "ON")
 set(SENSOR_FUSION_ENABLE "1")
 set(ORIENTATION_ENABLE "1")
 set(GRAVITY_ENABLE "1")
 set(LINEAR_ACCEL_ENABLE "1")
-add_definitions(-DENABLE_SENSOR_FUSION)
-add_definitions(-DENABLE_ORIENTATION)
-add_definitions(-DENABLE_GRAVITY)
-add_definitions(-DENABLE_LINEAR_ACCEL)
 ENDIF()
 IF("${SENSOR_FUSION_ENABLE}" STREQUAL "1")
 include_directories(${CMAKE_SOURCE_DIR}/src/server/plugins/sensor_fusion)
@@ -135,38 +116,47 @@ list (APPEND PLUGIN_SRCS "sensor_fusion/sensor_data.cpp")
 list (APPEND PLUGIN_SRCS "sensor_fusion/vector.cpp")
 include_directories(${CMAKE_SOURCE_DIR}/src/server/plugins/fusion)
 list (APPEND PLUGIN_SRCS "fusion/fusion_sensor.cpp")
+add_definitions(-DENABLE_SENSOR_FUSION)
 ENDIF()
 IF("${ORIENTATION_ENABLE}" STREQUAL "1")
 include_directories(${CMAKE_SOURCE_DIR}/src/server/plugins/orientation)
 list (APPEND PLUGIN_SRCS "orientation/orientation_sensor.cpp")
+add_definitions(-DENABLE_ORIENTATION)
 ENDIF()
 IF("${GRAVITY_ENABLE}" STREQUAL "1")
 include_directories(${CMAKE_SOURCE_DIR}/src/server/plugins/gravity)
 list (APPEND PLUGIN_SRCS "gravity/gravity_sensor.cpp")
+add_definitions(-DENABLE_GRAVITY)
 ENDIF()
 IF("${LINEAR_ACCEL_ENABLE}" STREQUAL "1")
 include_directories(${CMAKE_SOURCE_DIR}/src/server/plugins/linear_accel)
 list (APPEND PLUGIN_SRCS "linear_accel/linear_accel_sensor.cpp")
+add_definitions(-DENABLE_LINEAR_ACCEL)
 ENDIF()
 IF("${TILT_ENABLE}" STREQUAL "1")
 include_directories(${CMAKE_SOURCE_DIR}/src/server/plugins/tilt)
 list (APPEND PLUGIN_SRCS "tilt/tilt_sensor.cpp")
+add_definitions(-DENABLE_TILT)
 ENDIF()
 IF("${UNCAL_GYRO_ENABLE}" STREQUAL "1")
 include_directories(${CMAKE_SOURCE_DIR}/src/server/plugins/uncal_gyro)
 list (APPEND PLUGIN_SRCS "uncal_gyro/uncal_gyro_sensor.cpp")
+add_definitions(-DENABLE_UNCAL_GYRO)
 ENDIF()
 IF("${RV_ENABLE}" STREQUAL "1")
 include_directories(${CMAKE_SOURCE_DIR}/src/server/plugins/rotation_vector/rv)
 list (APPEND PLUGIN_SRCS "rotation_vector/rv/rv_sensor.cpp")
+add_definitions(-DENABLE_RV)
 ENDIF()
 IF("${GEOMAGNETIC_RV_ENABLE}" STREQUAL "1")
 include_directories(${CMAKE_SOURCE_DIR}/src/server/plugins/rotation_vector/geomagnetic_rv)
 list (APPEND PLUGIN_SRCS "rotation_vector/geomagnetic_rv/geomagnetic_rv_sensor.cpp")
+add_definitions(-DENABLE_GEOMAGNETIC_RV)
 ENDIF()
 IF("${GAMING_RV_ENABLE}" STREQUAL "1")
 include_directories(${CMAKE_SOURCE_DIR}/src/server/plugins/rotation_vector/gaming_rv)
 list (APPEND PLUGIN_SRCS "rotation_vector/gaming_rv/gaming_rv_sensor.cpp")
+add_definitions(-DENABLE_GAMING_RV)
 ENDIF()
 IF("${RV_RAW}" STREQUAL "ON")
 include_directories(${CMAKE_SOURCE_DIR}/src/server/plugins/rotation_vector/rv_raw)
index 2008bb5..780461b 100644 (file)
@@ -28,6 +28,9 @@
 #ifdef ENABLE_BIO_LED_RED
 #include <bio_led_red_sensor.h>
 #endif
+#ifdef ENABLE_SENSOR_FUSION
+#include <fusion_sensor.h>
+#endif
 #ifdef ENABLE_ORIENTATION
 #include <orientation_sensor.h>
 #endif
@@ -163,7 +166,7 @@ extern "C" sensor_module* create(void)
                module->sensors.push_back(ultraviolet_sensor_ptr);
 #endif
 
-#ifdef DENABLE_SENSOR_FUSION
+#ifdef ENABLE_SENSOR_FUSION
        fusion_sensor *fusion_sensor_ptr = NULL;
        try {
                fusion_sensor_ptr = new(std::nothrow) fusion_sensor;