diff --git a/frameworks/js/napi/src/sensor_napi_utils.cpp b/frameworks/js/napi/src/sensor_napi_utils.cpp index 040dbb295bfb20b18323082dab13fdde73474793..66d14d784bb7301e0c63eb5fc910100cbb32a614 100644 --- a/frameworks/js/napi/src/sensor_napi_utils.cpp +++ b/frameworks/js/napi/src/sensor_napi_utils.cpp @@ -187,7 +187,8 @@ std::map> g_sensorAttributeList = { { SENSOR_TYPE_ID_WEAR_DETECTION, { "value" } }, { SENSOR_TYPE_ID_ACCELEROMETER_UNCALIBRATED, { "x", "y", "z", "biasX", "biasY", "biasZ" } }, { SENSOR_TYPE_ID_COLOR, { "lightIntensity", "colorTemperature" } }, - { SENSOR_TYPE_ID_SAR, { "absorptionRatio" } } + { SENSOR_TYPE_ID_SAR, { "absorptionRatio" } }, + { SENSOR_TYPE_ID_FUSION_PRESSURE, { "fusionPressure" } }, }; std::map g_convertfuncList = { diff --git a/interfaces/inner_api/sensor_agent_type.h b/interfaces/inner_api/sensor_agent_type.h index c975813cfb8dbff79522c2f724cab34fb63b390c..5d57cb2ebbcd277d214ad521042936dac75317b7 100644 --- a/interfaces/inner_api/sensor_agent_type.h +++ b/interfaces/inner_api/sensor_agent_type.h @@ -102,7 +102,8 @@ typedef enum SensorTypeId { SENSOR_TYPE_ID_WEAR_DETECTION = 280, /**< Wear detection sensor */ SENSOR_TYPE_ID_ACCELEROMETER_UNCALIBRATED = 281, /**< Uncalibrated acceleration sensor */ SENSOR_TYPE_ID_RPC = 282, /**< Radio power control sensor */ - SENSOR_TYPE_ID_MAX = 30, /**< Maximum number of sensor type IDs*/ + SENSOR_TYPE_ID_FUSION_PRESSURE = 283, /**< Fusion pressure sensor */ + SENSOR_TYPE_ID_MAX = 300, /**< Maximum number of sensor type IDs*/ } SensorTypeId; /** @@ -519,6 +520,10 @@ typedef struct SensorActiveInfo { int64_t maxReportDelayNs = -1; /**< Maximum Report Delay, in ns */ } SensorActiveInfo; +typedef struct FusionPressureData { + float fusionPressure = 0.0f; +} FusionPressureData; + typedef void (*SensorActiveInfoCB)(SensorActiveInfo &sensorActiveInfo); #ifdef __cplusplus