From e8ba82885d1ad9ef076c0a84647245741d889bc8 Mon Sep 17 00:00:00 2001 From: Ankur Date: Mon, 16 Nov 2015 12:05:46 +0530 Subject: [PATCH] Fixing build issues for auto_rotation and rv_raw Tested auto_rotation on rd-pq Change-Id: Ie5fb189bdad77ec7544406072770f03fe3145d0d --- src/server/plugins/auto_rotation/auto_rotation_sensor.h | 1 + .../plugins/rotation_vector/rv_raw/rv_raw_sensor.cpp | 14 +++++++------- src/shared/sensor_types.h | 7 +++++++ 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/src/server/plugins/auto_rotation/auto_rotation_sensor.h b/src/server/plugins/auto_rotation/auto_rotation_sensor.h index d2d1998..f5bfceb 100755 --- a/src/server/plugins/auto_rotation/auto_rotation_sensor.h +++ b/src/server/plugins/auto_rotation/auto_rotation_sensor.h @@ -20,6 +20,7 @@ #ifndef _AUTO_ROTATION_SENSOR_H_ #define _AUTO_ROTATION_SENSOR_H_ +#include #include #include diff --git a/src/server/plugins/rotation_vector/rv_raw/rv_raw_sensor.cpp b/src/server/plugins/rotation_vector/rv_raw/rv_raw_sensor.cpp index 81b49fc..d617857 100755 --- a/src/server/plugins/rotation_vector/rv_raw/rv_raw_sensor.cpp +++ b/src/server/plugins/rotation_vector/rv_raw/rv_raw_sensor.cpp @@ -19,7 +19,7 @@ #include #include - +#include #include #include @@ -33,8 +33,8 @@ rv_raw_sensor::rv_raw_sensor() { m_name = string(SENSOR_NAME); - register_supported_event(RV_RAW_EVENT_RAW_DATA_REPORT_ON_TIME); - register_supported_event(RV_RAW_EVENT_CALIBRATION_NEEDED); + register_supported_event(RV_RAW_RAW_DATA_EVENT); + register_supported_event(RV_RAW_CALIBRATION_NEEDED_EVENT); physical_sensor::set_poller(rv_raw_sensor::working, this); } @@ -53,7 +53,7 @@ bool rv_raw_sensor::init() return false; } - sensor_properties_t properties; + sensor_properties_s properties; if (!m_sensor_hal->get_properties(properties)) { ERR("sensor->get_properties() is failed!\n"); @@ -90,9 +90,9 @@ bool rv_raw_sensor::process_event(void) AUTOLOCK(m_client_info_mutex); AUTOLOCK(m_mutex); - if (get_client_cnt(RV_RAW_EVENT_RAW_DATA_REPORT_ON_TIME)) { + if (get_client_cnt(RV_RAW_RAW_DATA_EVENT)) { event.sensor_id = get_id(); - event.event_type = RV_RAW_EVENT_RAW_DATA_REPORT_ON_TIME; + event.event_type = RV_RAW_RAW_DATA_EVENT; push(event); } @@ -128,7 +128,7 @@ int rv_raw_sensor::get_sensor_data(unsigned int type, sensor_data_t &data) { int state; - if (type != RV_RAW_BASE_DATA_SET) + if (type != RV_RAW_RAW_DATA_EVENT) return -1; state = m_sensor_hal->get_sensor_data(data); diff --git a/src/shared/sensor_types.h b/src/shared/sensor_types.h index 254213f..75e0e70 100644 --- a/src/shared/sensor_types.h +++ b/src/shared/sensor_types.h @@ -67,6 +67,13 @@ enum rot_event_type { ROTATION_VECTOR_RAW_DATA_EVENT = (ROTATION_VECTOR_SENSOR << 16) | 0x0001, }; +// Rotation Vector Raw +enum rv_raw_event_type { + RV_RAW_RAW_DATA_EVENT = (RV_RAW_SENSOR << 16) | 0x0001, + RV_RAW_CALIBRATION_NEEDED_EVENT = (RV_RAW_SENSOR << 16) | 0x0002 +}; + + // Ultraviolet enum ultraviolet_event_type { ULTRAVIOLET_RAW_DATA_EVENT = (ULTRAVIOLET_SENSOR << 16) | 0x0001, -- 2.7.4