From bcc7f159bdef472d1310bc55ce3b829b94456678 Mon Sep 17 00:00:00 2001 From: "kibak.yoon" Date: Thu, 2 Jun 2016 17:48:10 +0900 Subject: [PATCH] sensord: add new internal sensor types Change-Id: I9c7bb390184877f41d379fa1bb0115dd7edecc3b Signed-off-by: kibak.yoon --- src/hal/sensor_hal_types.h | 59 +++++++++++++++++++++++++---------------- src/shared/sensor_types.h | 66 ++++++++++++++++++++++++++++++++-------------- 2 files changed, 82 insertions(+), 43 deletions(-) diff --git a/src/hal/sensor_hal_types.h b/src/hal/sensor_hal_types.h index 91630c4..9b7ccde 100644 --- a/src/hal/sensor_hal_types.h +++ b/src/hal/sensor_hal_types.h @@ -71,12 +71,47 @@ typedef enum { SENSOR_DEVICE_HUMAN_PEDOMETER = 0x300, SENSOR_DEVICE_HUMAN_SLEEP_MONITOR, + SENSOR_DEVICE_HUMAN_SLEEP_DETECTOR, + SENSOR_DEVICE_HUMAN_STRESS_MONITOR, + + SENSOR_DEVICE_EXERCISE_WALKING = 0x400, + SENSOR_DEVICE_EXERCISE_RUNNING, + SENSOR_DEVICE_EXERCISE_HIKING, + SENSOR_DEVICE_EXERCISE_CYCLING, + SENSOR_DEVICE_EXERCISE_STAIR_CLIMBING, + SENSOR_DEVICE_EXERCISE_ELLIPTICAL, + SENSOR_DEVICE_EXERCISE_INDOOR_CYCLING, + SENSOR_DEVICE_EXERCISE_ROWING, + SENSOR_DEVICE_EXERCISE_STEPPER, SENSOR_DEVICE_FUSION = 0x900, SENSOR_DEVICE_AUTO_ROTATION, SENSOR_DEVICE_AUTO_BRIGHTNESS, - SENSOR_DEVICE_CONTEXT = 0x1000, + SENSOR_DEVICE_GESTURE_MOVEMENT = 0x1200, + SENSOR_DEVICE_GESTURE_WRIST_UP, + SENSOR_DEVICE_GESTURE_WRIST_DOWN, + SENSOR_DEVICE_GESTURE_MOVEMENT_STATE, + + SENSOR_DEVICE_GPS_BATCH = 0x1A00, + SENSOR_DEVICE_ACTIVITY_TRACKER, + + SENSOR_DEVICE_HRM_CTRL = 0x1A80, + SENSOR_DEVICE_EXERCISE_COACH, + SENSOR_DEVICE_ACTIVITY_LEVEL_MONITOR, + + SENSOR_DEVICE_WEAR_STATUS = 0x2000, + SENSOR_DEVICE_WEAR_ON_MONITOR, + SENSOR_DEVICE_NO_MOVE_DETECTOR, + SENSOR_DEVICE_RESTING_HR, + SENSOR_DEVICE_STEP_LEVEL_MONITOR, + SENSOR_DEVICE_EXERCISE, + SENSOR_DEVICE_EXERCISE_HR, + SENSOR_DEVICE_WORKOUT, + SENSOR_DEVICE_CYCLE_MONITOR, + SENSOR_DEVICE_STAIR_TRACKER, + + SENSOR_DEVICE_CONTEXT = 0x7000, SENSOR_DEVICE_MOTION, SENSOR_DEVICE_PIR, SENSOR_DEVICE_PIR_LONG, @@ -87,32 +122,10 @@ typedef enum { SENSOR_DEVICE_HRM_RAW, SENSOR_DEVICE_TILT, SENSOR_DEVICE_ROTATION_VECTOR_RAW, - SENSOR_DEVICE_EXERCISE, SENSOR_DEVICE_GSR, SENSOR_DEVICE_SIMSENSE, SENSOR_DEVICE_PPG, - SENSOR_DEVICE_GESTURE_MOVEMENT = 0x1200, - SENSOR_DEVICE_GESTURE_WRIST_UP, - SENSOR_DEVICE_GESTURE_WRIST_DOWN, - SENSOR_DEVICE_GESTURE_MOVEMENT_STATE, - - SENSOR_DEVICE_WEAR_STATUS = 0x1A00, - SENSOR_DEVICE_WEAR_ON_MONITOR, - SENSOR_DEVICE_GPS_BATCH, - SENSOR_DEVICE_ACTIVITY_TRACKER, - SENSOR_DEVICE_SLEEP_DETECTOR, - SENSOR_DEVICE_NO_MOVE_DETECTOR = 0x1A80, - SENSOR_DEVICE_HRM_CTRL, - SENSOR_DEVICE_EXERCISE_COACH, - SENSOR_DEVICE_EXERCISE_HR, - SENSOR_DEVICE_RESTING_HR, - SENSOR_DEVICE_STEP_LEVEL_MONITOR, - SENSOR_DEVICE_ACTIVITY_LEVEL_MONITOR, - SENSOR_DEVICE_CYCLE_MONITOR, - SENSOR_DEVICE_STRESS_MONITOR, - SENSOR_DEVICE_AUTOSESSION_EXERCISE, - SENSOR_DEVICE_STAIR_TRACKER, } sensor_device_type; /* diff --git a/src/shared/sensor_types.h b/src/shared/sensor_types.h index cb8e65e..5c890b9 100644 --- a/src/shared/sensor_types.h +++ b/src/shared/sensor_types.h @@ -54,12 +54,47 @@ extern "C" \ DEF_SENSOR_VALUE(HUMAN_PEDOMETER_SENSOR, 0x300) \ DEF_SENSOR(HUMAN_SLEEP_MONITOR_SENSOR) \ + DEF_SENSOR(HUMAN_SLEEP_DETECTOR_SENSOR) \ + DEF_SENSOR(HUMAN_STRESS_MONITOR_SENSOR) \ + \ + DEF_SENSOR_VALUE(EXERCISE_WALKING_SENSOR, 0x400) \ + DEF_SENSOR(EXERCISE_RUNNING_SENSOR) \ + DEF_SENSOR(EXERCISE_HIKING_SENSOR) \ + DEF_SENSOR(EXERCISE_CYCLING_SENSOR) \ + DEF_SENSOR(EXERCISE_STAIR_CLIMBING_SENSOR) \ + DEF_SENSOR(EXERCISE_ELLIPTICAL_SENSOR) \ + DEF_SENSOR(EXERCISE_INDOOR_CYCLING_SENSOR) \ + DEF_SENSOR(EXERCISE_ROWING_SENSOR) \ + DEF_SENSOR(EXERCISE_STEPPER_SENSOR) \ \ DEF_SENSOR_VALUE(FUSION_SENSOR, 0x900) \ DEF_SENSOR(AUTO_ROTATION_SENSOR) \ DEF_SENSOR(AUTO_BRIGHTNESS_SENSOR) \ \ - DEF_SENSOR_VALUE(CONTEXT_SENSOR, 0x1000) \ + DEF_SENSOR_VALUE(GESTURE_MOVEMENT_SENSOR, 0x1200) \ + DEF_SENSOR(GESTURE_WRIST_UP_SENSOR) \ + DEF_SENSOR(GESTURE_WRIST_DOWN_SENSOR) \ + DEF_SENSOR(GESTURE_MOVEMENT_STATE_SENSOR) \ + \ + DEF_SENSOR_VALUE(GPS_BATCH_SENSOR, 0x1A00) \ + DEF_SENSOR(ACTIVITY_TRACKER_SENSOR) \ + \ + DEF_SENSOR_VALUE(HRM_CTRL_SENSOR, 0x1A80) \ + DEF_SENSOR(EXERCISE_COACH_SENSOR) \ + DEF_SENSOR(ACTIVITY_LEVEL_MONITOR_SENSOR) \ + \ + DEF_SENSOR_VALUE(WEAR_STATUS_SENSOR, 0x2000) \ + DEF_SENSOR(WEAR_ON_MONITOR_SENSOR) \ + DEF_SENSOR(NO_MOVE_DETECTOR_SENSOR) \ + DEF_SENSOR(RESTING_HR_SENSOR) \ + DEF_SENSOR(STEP_LEVEL_MONITOR_SENSOR) \ + DEF_SENSOR(EXERCISE_SENSOR) \ + DEF_SENSOR(EXERCISE_HR_SENSOR) \ + DEF_SENSOR(WORKOUT_SENSOR) \ + DEF_SENSOR(CYCLE_MONITOR_SENSOR) \ + DEF_SENSOR(STAIR_TRACKER_SENSOR) \ + \ + DEF_SENSOR_VALUE(CONTEXT_SENSOR, 0x7000) \ DEF_SENSOR(MOTION_SENSOR) \ DEF_SENSOR(PIR_SENSOR) \ DEF_SENSOR(PIR_LONG_SENSOR) \ @@ -70,30 +105,21 @@ extern "C" DEF_SENSOR(HRM_RAW_SENSOR) \ DEF_SENSOR(TILT_SENSOR) \ DEF_SENSOR(RV_RAW_SENSOR) \ - DEF_SENSOR(EXERCISE_SENSOR) \ - \ - DEF_SENSOR_VALUE(GESTURE_MOVEMENT_SENSOR, 0x1200) \ - DEF_SENSOR(GESTURE_WRIST_UP_SENSOR) \ - DEF_SENSOR(GESTURE_WRIST_DOWN_SENSOR) \ - DEF_SENSOR(GESTURE_MOVEMENT_STATE_SENSOR) \ - \ - DEF_SENSOR_VALUE(WEAR_STATUS_SENSOR, 0x1A00) \ - DEF_SENSOR(WEAR_ON_MONITOR_SENSOR) \ - DEF_SENSOR(GPS_BATCH_SENSOR) \ - DEF_SENSOR(ACTIVITY_TRACKER_SENSOR) \ - DEF_SENSOR(SLEEP_DETECTOR_SENSOR) \ -#define BIO_HRM_SENSOR HRM_SENSOR -#define BIO_LED_GREEN_SENSOR HRM_LED_GREEN_SENSOR -#define BIO_LED_IR_SENSOR HRM_LED_IR_SENSOR -#define BIO_LED_RED_SENSOR HRM_LED_RED_SENSOR -#define BIO_SENSOR HRM_RAW_SENSOR +#define BIO_HRM_SENSOR HRM_SENSOR +#define BIO_LED_GREEN_SENSOR HRM_LED_GREEN_SENSOR +#define BIO_LED_IR_SENSOR HRM_LED_IR_SENSOR +#define BIO_LED_RED_SENSOR HRM_LED_RED_SENSOR +#define BIO_SENSOR HRM_RAW_SENSOR +#define SLEEP_DETECTOR_SENSOR HUMAN_SLEEP_DETECTOR_SENSOR +#define STRESS_MONITOR_SENSOR HUMAN_STRESS_MONITOR_SENSOR +#define AUTOSESSION_EXERCISE_SENSOR WORKOUT_SENSOR DECLARE_SENSOR_ENUM(sensor_type_t, SENSOR_TYPE) enum proxi_change_state { - PROXIMITY_STATE_NEAR = 0, - PROXIMITY_STATE_FAR = 1, + PROXIMITY_STATE_NEAR = 0, + PROXIMITY_STATE_FAR = 1, }; enum auto_rotation_state { -- 2.7.4