Fixing compiler issues during virtual sensor builds 33/27933/1
authorRamasamy <ram.kannan@samsung.com>
Tue, 23 Sep 2014 08:55:20 +0000 (14:25 +0530)
committerRamasamy <ram.kannan@samsung.com>
Tue, 23 Sep 2014 08:55:30 +0000 (14:25 +0530)
 - Fixed compiler issues when multiple virtual sensors are enabled
which are using the same source directories
 - Fixed compiler issue related to cleanup of orientation sensor
workaround code used for geo-magnetic sensor.

Change-Id: Ibbe6519d3b2b34d9796e52c5d856c7764593b7fd

packaging/sensord.spec
src/CMakeLists.txt
src/orientation/orientation_sensor.cpp

index 50e2b23..49ee89f 100755 (executable)
@@ -16,9 +16,8 @@ Source2:    sensord.socket
 %define pressure_state ON
 %define temperature_state OFF
 %define orientation_state ON
-%define gravity_state OFF
-%define linear_accel_state OFF
-%define motion_state OFF
+%define gravity_state ON
+%define linear_accel_state ON
 
 %define build_test_suite OFF
 
index ae649c6..8edcfe2 100755 (executable)
@@ -20,6 +20,11 @@ set(PROJECT_MINOR_VERSION "0")
 set(PROJECT_RELEASE_VERSION "1")
 set(CMAKE_VERBOSE_MAKEFILE OFF)
 
+set(SENSOR_FUSION_ENABLE "0")
+set(ORIENTATION_ENABLE "0")
+set(GRAVITY_ENABLE "0")
+set(LINEAR_ACCELERATION_ENABLE "0")
+
 IF("${ACCEL}" STREQUAL "ON")
 add_subdirectory(accel)
 ENDIF()
@@ -39,22 +44,31 @@ IF("${PRESSURE}" STREQUAL "ON")
 add_subdirectory(pressure)
 ENDIF()
 IF("${ORIENTATION}" STREQUAL "ON")
-add_subdirectory(sensor_fusion)
-add_subdirectory(orientation)
+set(SENSOR_FUSION_ENABLE "1")
+set(ORIENTATION_ENABLE "1")
 ENDIF()
 IF("${GRAVITY}" STREQUAL "ON")
-add_subdirectory(sensor_fusion)
-add_subdirectory(orientation)
-add_subdirectory(gravity)
+set(SENSOR_FUSION_ENABLE "1")
+set(ORIENTATION_ENABLE "1")
+set(GRAVITY_ENABLE "1")
 ENDIF()
 IF("${LINEAR_ACCEL}" STREQUAL "ON")
+set(SENSOR_FUSION_ENABLE "1")
+set(ORIENTATION_ENABLE "1")
+set(GRAVITY_ENABLE "1")
+set(LINEAR_ACCELERATION_ENABLE "1")
+ENDIF()
+IF("${SENSOR_FUSION_ENABLE}" STREQUAL "1")
 add_subdirectory(sensor_fusion)
+ENDIF()
+IF("${ORIENTATION_ENABLE}" STREQUAL "1")
 add_subdirectory(orientation)
+ENDIF()
+IF("${GRAVITY_ENABLE}" STREQUAL "1")
 add_subdirectory(gravity)
-add_subdirectory(linear_accel)
 ENDIF()
-IF("${MOTION}" STREQUAL "ON")
-add_subdirectory(motion)
+IF("${LINEAR_ACCELERATION_ENABLE}" STREQUAL "1")
+add_subdirectory(linear_accel)
 ENDIF()
 
 add_subdirectory(server)
index 0b051ce..14d0349 100755 (executable)
@@ -172,7 +172,7 @@ void orientation_sensor::synthesize(const sensor_event_t &event, vector<sensor_e
 
        sensor_data_t accel_data;
        sensor_data_t gyro_data;
-       sensor_data_t mag_data;
+       sensor_data_t magnetic_data;
 
        sensor_event_t orientation_event;
        euler_angles<float> euler_orientation;