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 2f2876b7f3ad80bb953882dbffcad2ccf1619f67..361351b1cdd4960601e014315ccc9d1e808703eb 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 fcf11f75e87943e54e295a05839f85fc60aa1e3c..4fcb859566ab67395015e4d0d51fa0b4806914f9 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 ee211d1e4a7436b682ca4b526775be3b02d8a7d4..b7b06fe2ede331df9eff46a5e6244594d7e07575 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 aae9081ffae2d730c29df9be32df51860aa41bb1..48346aca7a4b7a91a8eb67a498f58f83b46df18e 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,