[UTC][Sensor][ACR-1655] Add new sensor types and features 20/268220/1
authortaemin.yeom <taemin.yeom@samsung.com>
Thu, 16 Dec 2021 08:45:53 +0000 (17:45 +0900)
committertaemin.yeom <taemin.yeom@samsung.com>
Fri, 17 Dec 2021 06:53:55 +0000 (15:53 +0900)
-SENSOR_ORIENTATION
-SENSOR_GYROSCOPE_ORIENTATION
-SENSOR_GEOMAGNETIC_ORIENTATION

Change-Id: I4335b190f788ccad6f2b96b5b1b6d9aac2be388b
Signed-off-by: taemin.yeom <taemin.yeom@samsung.com>
src/utc/sensor/utc-sensor-common.h
src/utc/sensor/utc-system-sensor-basic.c
src/utc/sensor/utc-system-sensor-recorder.c

index 22de8c8b32520222939041ac871f5a4aa5bd2bc2..defa7e5d6fd2d70726b46b6fcda0a9756966a444 100644 (file)
@@ -40,6 +40,8 @@
     F(SENSOR_GEOMAGNETIC_UNCALIBRATED)    \
     F(SENSOR_GYROSCOPE_ROTATION_VECTOR)   \
     F(SENSOR_GEOMAGNETIC_ROTATION_VECTOR) \
+    F(SENSOR_GYROSCOPE_ORIENTATION)       \
+    F(SENSOR_GEOMAGNETIC_ORIENTATION)     \
     F(SENSOR_HRM_BATCH)                   \
     F(SENSOR_HRM_LED_GREEN_BATCH)
 
index ad885a39058a1eef5e27a4287b6cf3d74f59fa62..564162495e446c2629ea19e31db09f432c39460e 100755 (executable)
@@ -51,6 +51,8 @@ sensor_type_e types[] = {
        SENSOR_GEOMAGNETIC_UNCALIBRATED,         /**< Uncalibrated Geomagnetic sensor (Since Tizen 2.4) */
        SENSOR_GYROSCOPE_ROTATION_VECTOR,        /**< Gyroscope-based rotation vector sensor (Since Tizen 2.4) */
        SENSOR_GEOMAGNETIC_ROTATION_VECTOR,      /**< Geomagnetic-based rotation vector sensor (Since Tizen 2.4) */
+       SENSOR_GYROSCOPE_ORIENTATION,            /**< Orientation sensor based on gyroscope rotation vector Since 6.5 */
+       SENSOR_GEOMAGNETIC_ORIENTATION,          /**< Orientation sensor based on geomagnetic rotation vector Since 6.5 */
        SENSOR_HRM_BATCH,                        /**< Heart Rate Monitor Batch sensor */
        SENSOR_HRM_LED_GREEN_BATCH               /**< HRM (LED Green) Batch sensor */
 };
@@ -92,6 +94,8 @@ const char *uri_types[] = {
        "http://tizen.org/sensor/general/geomagnetic.uncalibrated",              /**< Uncalibrated Geomagnetic sensor (Since Tizen 2.4) */
        "http://tizen.org/sensor/general/gyroscope_rotation_vector",             /**< Gyroscope-based rotation vector sensor (Since Tizen 2.4) */
        "http://tizen.org/sensor/general/geomagnetic_rotation_vector",           /**< Geomagnetic-based rotation vector sensor (Since Tizen 2.4) */
+       "http://tizen.org/sensor/general/gyroscope_orientation",                 /**< Orientation sensor based on gyroscope rotation vector Since 6.5 */
+       "http://tizen.org/sensor/general/geomagnetic_orientation",               /**< Orientation sensor based on geomagnetic rotation vector Since 6.5 */
        "http://tizen.org/sensor/healthinfo/heart_rate_monitor.batch",           /**< Heart Rate Monitor Batch sensor */
        "http://tizen.org/sensor/healthinfo/heart_rate_monitor.led_green.batch", /**< HRM (LED Green) Batch sensor */
 };
@@ -117,6 +121,8 @@ static char* sensor_features[] = {
        "http://tizen.org/feature/sensor.magnetometer.uncalibrated",
        "http://tizen.org/feature/sensor.gyroscope_rotation_vector",
        "http://tizen.org/feature/sensor.geomagnetic_rotation_vector",
+       "http://tizen.org/feature/sensor.gyroscope_orientation",
+       "http://tizen.org/feature/sensor.geomagnetic_orientation",
        "http://tizen.org/feature/sensor.heart_rate_monitor.batch",
        "http://tizen.org/feature/sensor.heart_rate_monitor.led_green.batch",
 };
@@ -129,8 +135,8 @@ static char* manual_sensor_features[] = {
        "http://tizen.org/feature/sensor.stress_monitor",
 };
 
-static bool sensor_supported[22];
-static bool manual_sensor_supported[1];
+static bool sensor_supported[30];
+static bool manual_sensor_supported[10];
 static bool supported=false;
 
 static gboolean timeout_func(gpointer data)
index 715a39296eae5d223b778f95a1761db57e646c81..9bf0d51cd477dbf7bf8429115984fa9d2065bb2d 100755 (executable)
@@ -52,6 +52,8 @@ static sensor_type_e sensor_types[] = {
        SENSOR_GEOMAGNETIC_UNCALIBRATED,         /**< Uncalibrated Geomagnetic sensor (Since Tizen 2.4) */
        SENSOR_GYROSCOPE_ROTATION_VECTOR,        /**< Gyroscope-based rotation vector sensor (Since Tizen 2.4) */
        SENSOR_GEOMAGNETIC_ROTATION_VECTOR,      /**< Geomagnetic-based rotation vector sensor (Since Tizen 2.4) */
+       SENSOR_GYROSCOPE_ORIENTATION,            /**< Orientation sensor based on gyroscope rotation vector Since 6.5 */
+       SENSOR_GEOMAGNETIC_ORIENTATION,          /**< Orientation sensor based on geomagnetic rotation vector Since 6.5 */
        SENSOR_HUMAN_PEDOMETER,                  /**< Pedometer
                                                      @if MOBILE (Since 3.0) @elseif WEARABLE (Since 2.3.2) @endif
                                                      @n Privilege : http://tizen.org/privilege/healthinfo */
@@ -89,6 +91,8 @@ static char* sensor_features[] = {
        "http://tizen.org/feature/sensor.magnetometer.uncalibrated",
        "http://tizen.org/feature/sensor.gyroscope_rotation_vector",
        "http://tizen.org/feature/sensor.geomagnetic_rotation_vector",
+       "http://tizen.org/feature/sensor.gyroscope_orientation",
+       "http://tizen.org/feature/sensor.geomagnetic_orientation",
        "http://tizen.org/feature/sensor.pedometer",
        "http://tizen.org/feature/sensor.sleep_monitor",
        "http://tizen.org/feature/sensor.sleep_monitor",
@@ -108,8 +112,8 @@ static int g_read_int_error_n = SENSOR_ERROR_NONE;
 static int g_read_double_error_p = SENSOR_ERROR_NONE;
 static int g_read_double_error_n = SENSOR_ERROR_NONE;
 
-static bool sensor_supported[26];
-static bool sensor_recorder_supported[26];
+static bool sensor_supported[30];
+static bool sensor_recorder_supported[30];
 static int sensor_count;
 
 static bool recorder_async_cb(sensor_type_e type, sensor_recorder_data_h data, int remains, sensor_error_e error, void *user_data)