From 6ba6d69870a8754adc334483f9c42055d65ede5c Mon Sep 17 00:00:00 2001 From: cff-gite Date: Thu, 8 Sep 2022 17:01:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: cff-gite --- .../reference/apis/js-apis-sensor.md | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/zh-cn/application-dev/reference/apis/js-apis-sensor.md b/zh-cn/application-dev/reference/apis/js-apis-sensor.md index c756446c03..a195369df1 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-sensor.md +++ b/zh-cn/application-dev/reference/apis/js-apis-sensor.md @@ -2385,7 +2385,7 @@ createRotationMatrix(gravity: Array<number>, geomagnetic: Array<number& ## sensor.getSensorLists9+ - getSensorLists(callback: AsyncCallback<sensor>): void + getSensorLists(callback: AsyncCallback): void 获取设备上的所有传感器信息。 @@ -2393,9 +2393,9 @@ createRotationMatrix(gravity: Array<number>, geomagnetic: Array<number& **参数:** -| 参数名 | 类型 | 必填 | 说明 | -| -------- | -------------------------------------- | ---- | ---------------- | -| callback | AsyncCallback<[Sensor](#sensor)> | 是 | 返回传感器列表。 | +| 参数名 | 类型 | 必填 | 说明 | +| -------- | --------------------------------------------- | ---- | ---------------- | +| callback | AsyncCallback | 是 | 返回传感器列表。 | **示例:** @@ -2408,8 +2408,8 @@ sensor.getSensorList((error, data) => { for (var i = 0; i < data.length; i++) { console.info("getSensorList " + JSON.stringify(data[i])); } - } - }); + } +}); ``` ## sensor.getSensorLists9+ @@ -2422,15 +2422,15 @@ sensor.getSensorList((error, data) => { **返回值:** -| 参数名 | 类型 | 必填 | 说明 | -| ------- | -------------------------------- | ---- | ---------------- | -| promise | Promise<[Sensor](#sensor)> | 是 | 返回传感器列表。 | +| 参数名 | 类型 | 必填 | 说明 | +| ------- | --------------------------------------- | ---- | ---------------- | +| promise | Promise | 是 | 返回传感器列表。 | **示例:** ``` sensor.getSensorList().then((data) => { - console.info("getSensorList promise in-----------" + data.length); + console.info("getSensorList promise in" + data.length); for (var i = 0; i < data.length; i++) { console.info("getSensorList " + JSON.stringify(data[i])); } @@ -2540,7 +2540,7 @@ sensor.getSingleSensor(sensor.SensorType.SENSOR_TYPE_ID_ACCELEROMETER).then((dat | --------- | -------- | ---- | ---- | ------------------------ | | timestamp | number | 是 | 是 | 传感器数据上报的时间戳。 | -## Sensor9+ +## Sensor 指示传感器信息。 -- GitLab