diff --git a/frameworks/js/napi/src/sensor_napi_utils.cpp b/frameworks/js/napi/src/sensor_napi_utils.cpp index 66d14d784bb7301e0c63eb5fc910100cbb32a614..930d7eba974c067e4821418a6a27bda26e9a3ff5 100644 --- a/frameworks/js/napi/src/sensor_napi_utils.cpp +++ b/frameworks/js/napi/src/sensor_napi_utils.cpp @@ -177,6 +177,7 @@ std::map> g_sensorAttributeList = { { SENSOR_TYPE_ID_GRAVITY, { "x", "y", "z" } }, { SENSOR_TYPE_ID_LINEAR_ACCELERATION, { "x", "y", "z" } }, { SENSOR_TYPE_ID_ROTATION_VECTOR, { "x", "y", "z", "w" } }, + { SENSOR_TYPE_ID_GAME_ROTATION_VECTOR, { "x", "y", "z", "w" } }, { SENSOR_TYPE_ID_AMBIENT_TEMPERATURE, { "temperature" } }, { SENSOR_TYPE_ID_MAGNETIC_FIELD_UNCALIBRATED, { "x", "y", "z", "biasX", "biasY", "biasZ" } }, { SENSOR_TYPE_ID_GYROSCOPE_UNCALIBRATED, { "x", "y", "z", "biasX", "biasY", "biasZ" } }, @@ -189,6 +190,9 @@ std::map> g_sensorAttributeList = { { SENSOR_TYPE_ID_COLOR, { "lightIntensity", "colorTemperature" } }, { SENSOR_TYPE_ID_SAR, { "absorptionRatio" } }, { SENSOR_TYPE_ID_FUSION_PRESSURE, { "fusionPressure" } }, + { SENSOR_TYPE_ID_DROP_DETECTION, { "x", "y", "z", "biasX", "biasY", "biasZ" } }, + { SENSOR_TYPE_ID_POSTURE, { "gxm", "gym", "gzm", "gxs", "gys", "gzs", "angle", "screenAndPostureStatus", "gxt", + "gyt", "gzt", "abAngle", "abFoldedState" } }, }; std::map g_convertfuncList = { diff --git a/interfaces/inner_api/sensor_agent_type.h b/interfaces/inner_api/sensor_agent_type.h index 5d57cb2ebbcd277d214ad521042936dac75317b7..57509831e9c4cfcc811b5d4cd5b1b4cab5f839dd 100644 --- a/interfaces/inner_api/sensor_agent_type.h +++ b/interfaces/inner_api/sensor_agent_type.h @@ -510,7 +510,12 @@ typedef struct HeadPostureData { } HeadPostureData; typedef struct DropDetectionData { - float status = 0.0; + float x = 0.0; + float y = 0.0; + float z = 0.0; + float biasX = 0.0; + float biasY = 0.0; + float biasZ = 0.0; } DropDetectionData; typedef struct SensorActiveInfo {