From 75cdcdc69fd5f7b3abfdc0248cffb889f4a96cc0 Mon Sep 17 00:00:00 2001 From: Ramasamy Date: Tue, 26 Aug 2014 15:29:56 +0530 Subject: [PATCH] Supporting Virtual Sensor data based only on event types - Sensor data representation based only on sensor event types - removing redundant representation for sensor data using data id signed-off-by: Ramasamy Change-Id: Id2d530cede56ec4133b9db152f94a84a6c36d8e5 --- src/libsensord/client_common.cpp | 5 ----- src/libsensord/sensor_gravity.h | 6 +----- src/libsensord/sensor_linear_accel.h | 4 ---- src/libsensord/sensor_orientation.h | 7 +------ 4 files changed, 2 insertions(+), 20 deletions(-) diff --git a/src/libsensord/client_common.cpp b/src/libsensord/client_common.cpp index 62aa507..5ed83f3 100755 --- a/src/libsensord/client_common.cpp +++ b/src/libsensord/client_common.cpp @@ -75,9 +75,6 @@ log_element g_log_elements[] = { FILL_LOG_ELEMENT(LOG_ID_DATA, GEOMAGNETIC_ATTITUDE_DATA_SET, 0, 25), FILL_LOG_ELEMENT(LOG_ID_DATA, LIGHT_BASE_DATA_SET, 0, 25), FILL_LOG_ELEMENT(LOG_ID_DATA, LIGHT_LUX_DATA_SET, 0, 25), - FILL_LOG_ELEMENT(LOG_ID_DATA, GRAVITY_BASE_DATA_SET, 0, 25), - FILL_LOG_ELEMENT(LOG_ID_DATA, LINEAR_ACCEL_BASE_DATA_SET, 0, 25), - FILL_LOG_ELEMENT(LOG_ID_DATA, ORIENTATION_BASE_DATA_SET, 0, 25), FILL_LOG_ELEMENT(LOG_ID_ROTATE, ROTATION_EVENT_0, 0, 1), FILL_LOG_ELEMENT(LOG_ID_ROTATE, ROTATION_EVENT_90, 0, 1), @@ -210,8 +207,6 @@ unsigned int get_calibration_event_type(unsigned int event_type) switch (sensor) { case GEOMAGNETIC_SENSOR: return GEOMAGNETIC_EVENT_CALIBRATION_NEEDED; - case ORIENTATION_SENSOR: - return ORIENTATION_EVENT_CALIBRATION_NEEDED; default: return 0; } diff --git a/src/libsensord/sensor_gravity.h b/src/libsensord/sensor_gravity.h index 16a5f82..d80ad41 100755 --- a/src/libsensord/sensor_gravity.h +++ b/src/libsensord/sensor_gravity.h @@ -36,12 +36,8 @@ extern "C" * @{ */ -enum gravity_data_id { - GRAVITY_BASE_DATA_SET = (GRAVITY_SENSOR << 16) | 0x0001, -}; - enum gravity_event_type { - GRAVITY_EVENT_RAW_DATA_REPORT_ON_TIME = (GRAVITY_SENSOR << 16) | 0x0002, + GRAVITY_EVENT_RAW_DATA_REPORT_ON_TIME = (GRAVITY_SENSOR << 16) | 0x0001, }; /** diff --git a/src/libsensord/sensor_linear_accel.h b/src/libsensord/sensor_linear_accel.h index 4a98503..ba48a83 100755 --- a/src/libsensord/sensor_linear_accel.h +++ b/src/libsensord/sensor_linear_accel.h @@ -36,10 +36,6 @@ extern "C" * @{ */ -enum linear_accel_data_id { - LINEAR_ACCEL_BASE_DATA_SET = (LINEAR_ACCEL_SENSOR << 16) | 0x0001, -}; - enum linear_accel_event_type { LINEAR_ACCEL_EVENT_RAW_DATA_REPORT_ON_TIME = (LINEAR_ACCEL_SENSOR << 16) | 0x0001, }; diff --git a/src/libsensord/sensor_orientation.h b/src/libsensord/sensor_orientation.h index 0444887..3c8eb6e 100755 --- a/src/libsensord/sensor_orientation.h +++ b/src/libsensord/sensor_orientation.h @@ -36,13 +36,8 @@ extern "C" * @{ */ -enum orientation_data_id { - ORIENTATION_BASE_DATA_SET = (ORIENTATION_SENSOR << 16) | 0x0001, -}; - enum orientation_event_type { - ORIENTATION_EVENT_CALIBRATION_NEEDED = (ORIENTATION_SENSOR << 16) | 0x0001, - ORIENTATION_EVENT_RAW_DATA_REPORT_ON_TIME = (ORIENTATION_SENSOR << 16) | 0x0002, + ORIENTATION_EVENT_RAW_DATA_REPORT_ON_TIME = (ORIENTATION_SENSOR << 16) | 0x0001, }; /** -- 2.7.4