LIDAR: Add power state attribute 66/287366/2 accepted/tizen/unified/20230131.162124
authorTaeminYeom <taemin.yeom@samsung.com>
Fri, 27 Jan 2023 08:01:04 +0000 (17:01 +0900)
committerTaeminYeom <taemin.yeom@samsung.com>
Fri, 27 Jan 2023 08:04:43 +0000 (17:04 +0900)
Previous LIDAR sensor used sensor listener attribute.
But sensor handle attribute was made so, to set and get lidar attribute
with sensor handle attribute API, new sensor handle attribute is needed.

Added Enum:
-sensor_lidar_power_state_e
  SENSOR_LIDAR_POWER_STATE_OFF
  SENSOR_LIDAR_POWER_STATE_ON

Change-Id: I7ba62df02183184d820b9faf48f98bf2235a44f7
Signed-off-by: TaeminYeom <taemin.yeom@samsung.com>
include/sensor-internal.h

index 52eeaea..177f233 100644 (file)
@@ -42,7 +42,9 @@ typedef enum {
 typedef enum
 {
        SENSOR_HANDLE_ATTR_PROXIMITY_SENSITIVITY_LEVEL =
-               CONVERT_TYPE_ATTR(SENSOR_PROXIMITY, 0x1)
+               CONVERT_TYPE_ATTR(SENSOR_PROXIMITY, 0x1),
+       SENSOR_HANDLE_ATTR_LIDAR_POWER_STATE =
+               CONVERT_TYPE_ATTR(SENSOR_LIDAR, 0x1)
 } sensor_handle_attribute_e;
 
 /**
@@ -57,6 +59,16 @@ typedef enum
 } sensor_proximity_sensitivity_level_e;
 
 /**
+ * @brief Enumeration for lidar power state attribute value.
+ * @since_tizen 7.0
+ */
+typedef enum
+{
+       SENSOR_LIDAR_POWER_STATE_OFF = 0,
+       SENSOR_LIDAR_POWER_STATE_ON = 1
+} sensor_lidar_power_state_e;
+
+/**
  * @brief Sets the attribute to a connected sensor.
  * @since_tizen 6.5
  *