提交 30187223 编写于 作者: C cff-gite

添加sensor接口

Signed-off-by: Ncff-gite <chenfeifei8@huawei.com>
上级 de485d65
...@@ -1880,11 +1880,11 @@ getGeomagneticField(locationOptions: LocationOptions, timeMillis: number, callba ...@@ -1880,11 +1880,11 @@ getGeomagneticField(locationOptions: LocationOptions, timeMillis: number, callba
**系统能力**:SystemCapability.Sensors.Sensor **系统能力**:SystemCapability.Sensors.Sensor
**参数:** **参数:**
| 说明 | 参数名 | 类型 | 必填 | | 参数名 | 类型 | 必填 | 说明 |
| ---------------------------------- | --------------- | ------------------------------------------------------------ | ---- | | --------------- | ------------------------------------------------------------ | ---- | ---------------------------------- |
| 地理位置。 | locationOptions | [LocationOptions](#locationoptions) | 是 | | locationOptions | [LocationOptions](#locationoptions) | 是 | 地理位置。 |
| 表示获取磁偏角的时间,单位为毫秒。 | timeMillis | number | 是 | | timeMillis | number | 是 | 表示获取磁偏角的时间,单位为毫秒。 |
| 返回磁场信息。 | callback | AsyncCallback&lt;[GeomagneticResponse](#geomagneticresponse)&gt; | 是 | | callback | AsyncCallback&lt;[GeomagneticResponse](#geomagneticresponse)&gt; | 是 | 返回磁场信息。 |
**示例:** **示例:**
```js ```js
...@@ -2564,8 +2564,6 @@ sensor.getSingleSensor(sensor.SensorType.SENSOR_TYPE_ID_ACCELEROMETER, function( ...@@ -2564,8 +2564,6 @@ sensor.getSingleSensor(sensor.SensorType.SENSOR_TYPE_ID_ACCELEROMETER, function(
| precision | number | 是 | 是 | 传感器精度。 | | precision | number | 是 | 是 | 传感器精度。 |
| power | number | 是 | 是 | 传感器电源。 | | power | number | 是 | 是 | 传感器电源。 |
## AccelerometerResponse ## AccelerometerResponse
加速度传感器数据,继承于[Response](#response) 加速度传感器数据,继承于[Response](#response)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册