Updating sensor API for Gaming RV virtual sensor 51/35751/5
authorRamasamy <ram.kannan@samsung.com>
Tue, 24 Feb 2015 08:46:14 +0000 (14:16 +0530)
committerRamasamy Kannan <ram.kannan@samsung.com>
Thu, 26 Feb 2015 06:39:47 +0000 (22:39 -0800)
Adding sensor API related changes for Gaming RV virtual sensor.

Change-Id: If0e5dc62e1f122739b888c14e61ee3e8d66e9aca

src/libsensord/client_common.cpp
src/libsensord/sensor_gaming_rv.h [new file with mode: 0755]
src/libsensord/sensor_internal.h
src/libsensord/sensor_internal_deprecated.h
src/shared/sensor_common.h

index 2f2876b..361351b 100755 (executable)
@@ -42,6 +42,7 @@ log_element g_log_elements[] = {
        FILL_LOG_ELEMENT(LOG_ID_SENSOR_TYPE, TEMPERATURE_SENSOR, 0, 1),
        FILL_LOG_ELEMENT(LOG_ID_SENSOR_TYPE, ROTATION_VECTOR_SENSOR, 0, 1),
        FILL_LOG_ELEMENT(LOG_ID_SENSOR_TYPE, GEOMAGNETIC_RV_SENSOR, 0, 1),
+       FILL_LOG_ELEMENT(LOG_ID_SENSOR_TYPE, GAMING_RV_SENSOR, 0, 1),
 
        FILL_LOG_ELEMENT(LOG_ID_EVENT, GEOMAGNETIC_CALIBRATION_NEEDED_EVENT, 0, 1),
        FILL_LOG_ELEMENT(LOG_ID_EVENT, PROXIMITY_CHANGE_STATE_EVENT, 0,1),
@@ -63,6 +64,7 @@ log_element g_log_elements[] = {
        FILL_LOG_ELEMENT(LOG_ID_EVENT, TEMPERATURE_RAW_DATA_EVENT, 0, 10),
        FILL_LOG_ELEMENT(LOG_ID_EVENT, ROTATION_VECTOR_EVENT_RAW_DATA_REPORT_ON_TIME, 0, 10),
        FILL_LOG_ELEMENT(LOG_ID_EVENT, GEOMAGNETIC_RV_RAW_DATA_EVENT, 0, 10),
+       FILL_LOG_ELEMENT(LOG_ID_EVENT, GAMING_RV_RAW_DATA_EVENT, 0, 10),
 
        FILL_LOG_ELEMENT(LOG_ID_DATA, LIGHT_BASE_DATA_SET, 0, 25),
        FILL_LOG_ELEMENT(LOG_ID_DATA, LIGHT_LUX_DATA_SET, 0, 25),
diff --git a/src/libsensord/sensor_gaming_rv.h b/src/libsensord/sensor_gaming_rv.h
new file mode 100755 (executable)
index 0000000..e290313
--- /dev/null
@@ -0,0 +1,35 @@
+
+#ifndef __SENSOR_GAMING_RV_H__
+#define __SENSOR_GAMING_RV_H__
+
+//! Pre-defined events for the gaming rotation vector sensor
+//! Sensor Plugin developer can add more event to their own headers
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/**
+ * @defgroup SENSOR_GEOMAGNETIC_RV Rotation Vector Sensor
+ * @ingroup SENSOR_FRAMEWORK
+ *
+ * These APIs are used to control the Gaming Rotation Vector sensor.
+ * @{
+ */
+
+enum gaming_rv_event_type {
+       GAMING_RV_RAW_DATA_EVENT        = (GAMING_RV_SENSOR << 16) | 0x0001,
+};
+
+/**
+ * @}
+ */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+//! End of a file
+
index fcf11f7..4fcb859 100755 (executable)
@@ -52,6 +52,7 @@ extern "C"
 #include <sensor_orientation.h>
 #include <sensor_rv.h>
 #include <sensor_geomagnetic_rv.h>
+#include <sensor_gaming_rv.h>
 #include <sensor_temperature.h>
 
 
index ee211d1..b7b06fe 100755 (executable)
@@ -50,6 +50,7 @@ extern "C"
 #include <sensor_temperature.h>
 #include <sensor_rv.h>
 #include <sensor_geomagnetic_rv.h>
+#include <sensor_gaming_rv.h>
 #include <sensor_motion.h>
 #include <sensor_deprecated.h>
 
index aae9081..48346ac 100755 (executable)
@@ -64,6 +64,7 @@ typedef enum {
        LINEAR_ACCEL_SENSOR,
        ROTATION_VECTOR_SENSOR,
        GEOMAGNETIC_RV_SENSOR,
+       GAMING_RV_SENSOR,
        ORIENTATION_SENSOR,
        PIR_SENSOR,
        PIR_LONG_SENSOR,