Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
6fefbbbb
D
Docs
项目概览
OpenHarmony
/
Docs
大约 1 年 前同步成功
通知
159
Star
292
Fork
28
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
Docs
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
6fefbbbb
编写于
3月 15, 2023
作者:
O
openharmony_ci
提交者:
Gitee
3月 15, 2023
浏览文件
操作
浏览文件
下载
差异文件
!16086 翻译完成:15604 修改docs文档
Merge pull request !16086 from wusongqing/TR15604
上级
8acbd964
2ea866ba
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
15 addition
and
27 deletion
+15
-27
en/application-dev/reference/apis/js-apis-sensor.md
en/application-dev/reference/apis/js-apis-sensor.md
+15
-27
未找到文件。
en/application-dev/reference/apis/js-apis-sensor.md
浏览文件 @
6fefbbbb
...
@@ -2661,7 +2661,7 @@ try {
...
@@ -2661,7 +2661,7 @@ try {
## sensor.getAngleVariation<sup>9+</sup>
## sensor.getAngleVariation<sup>9+</sup>
getAngleVariation(currentRotationMatrix: Array
<
number
>
, preRotationMatrix: Array
<
number
>
,
getAngleVariation(currentRotationMatrix: Array
<
number
>
, preRotationMatrix: Array
<
number
>
,
callback: AsyncCallback
<Array
&
lt
;
number
&
gt
;
>
): void
callback: AsyncCallback
<
Array
<
number
>>
): void
Obtains the angle change between two rotation matrices. This API uses an asynchronous callback to return the result.
Obtains the angle change between two rotation matrices. This API uses an asynchronous callback to return the result.
...
@@ -2717,7 +2717,7 @@ try {
...
@@ -2717,7 +2717,7 @@ try {
## sensor.getAngleVariation<sup>9+</sup>
## sensor.getAngleVariation<sup>9+</sup>
getAngleVariation(currentRotationMatrix: Array
<
number
>
, preRotationMatrix: Array
<
number
>
): Promise
<Array
&
lt
;
number
&
gt
;
>
getAngleVariation(currentRotationMatrix: Array
<
number
>
, preRotationMatrix: Array
<
number
>
): Promise
<
Array
<
number
>>
Obtains the angle change between two rotation matrices. This API uses a promise to return the result.
Obtains the angle change between two rotation matrices. This API uses a promise to return the result.
...
@@ -2777,7 +2777,7 @@ try {
...
@@ -2777,7 +2777,7 @@ try {
## sensor.getRotationMatrix<sup>9+</sup>
## sensor.getRotationMatrix<sup>9+</sup>
getRotationMatrix(rotationVector: Array
<
number
>
, callback: AsyncCallback
<Array
&
lt
;
number
&
gt
;
>
): void
getRotationMatrix(rotationVector: Array
<
number
>
, callback: AsyncCallback
<
Array
<
number
>>
): void
Obtains the rotation matrix from a rotation vector. This API uses an asynchronous callback to return the result.
Obtains the rotation matrix from a rotation vector. This API uses an asynchronous callback to return the result.
...
@@ -2819,7 +2819,7 @@ try {
...
@@ -2819,7 +2819,7 @@ try {
## sensor.getRotationMatrix<sup>9+</sup>
## sensor.getRotationMatrix<sup>9+</sup>
getRotationMatrix(rotationVector: Array
<
number
>
): Promise
<Array
<
number
&
gt
;
>
getRotationMatrix(rotationVector: Array
<
number
>
): Promise
<
Array
<
number
>>
Obtains the rotation matrix from a rotation vector. This API uses a promise to return the result.
Obtains the rotation matrix from a rotation vector. This API uses a promise to return the result.
...
@@ -2866,7 +2866,7 @@ try {
...
@@ -2866,7 +2866,7 @@ try {
## sensor.transformRotationMatrix<sup>9+</sup>
## sensor.transformRotationMatrix<sup>9+</sup>
transformRotationMatrix(inRotationVector: Array
<
number
>
, coordinates: CoordinatesOptions,
transformRotationMatrix(inRotationVector: Array
<
number
>
, coordinates: CoordinatesOptions,
callback: AsyncCallback
<Array
&
lt
;
number
&
gt
;
>
): void
callback: AsyncCallback
<
Array
<
number
>>
): void
Transforms a rotation vector based on the coordinate system. This API uses an asynchronous callback to return the result.
Transforms a rotation vector based on the coordinate system. This API uses an asynchronous callback to return the result.
...
@@ -2913,7 +2913,7 @@ try {
...
@@ -2913,7 +2913,7 @@ try {
## sensor.transformRotationMatrix<sup>9+</sup>
## sensor.transformRotationMatrix<sup>9+</sup>
transformRotationMatrix(inRotationVector: Array
<
number
>
, coordinates: CoordinatesOptions): Promise
<Array
&
lt
;
number
&
gt
;
>
transformRotationMatrix(inRotationVector: Array
<
number
>
, coordinates: CoordinatesOptions): Promise
<
Array
<
number
>>
Transforms a rotation vector based on the coordinate system. This API uses a promise to return the result.
Transforms a rotation vector based on the coordinate system. This API uses a promise to return the result.
...
@@ -2964,7 +2964,7 @@ try {
...
@@ -2964,7 +2964,7 @@ try {
## sensor.getQuaternion<sup>9+</sup>
## sensor.getQuaternion<sup>9+</sup>
getQuaternion(rotationVector: Array
<
number
>
, callback: AsyncCallback
<Array
&
lt
;
number
&
gt
;
>
): void
getQuaternion(rotationVector: Array
<
number
>
, callback: AsyncCallback
<
Array
<
number
>>
): void
Obtains the quaternion from a rotation vector. This API uses an asynchronous callback to return the result.
Obtains the quaternion from a rotation vector. This API uses an asynchronous callback to return the result.
...
@@ -3006,7 +3006,7 @@ try {
...
@@ -3006,7 +3006,7 @@ try {
## sensor.getQuaternion<sup>9+</sup>
## sensor.getQuaternion<sup>9+</sup>
getQuaternion(rotationVector: Array
<
number
>
): Promise
<Array
&
lt
;
number
&
gt
;
>
getQuaternion(rotationVector: Array
<
number
>
): Promise
<
Array
<
number
>>
Obtains the quaternion from a rotation vector. This API uses a promise to return the result.
Obtains the quaternion from a rotation vector. This API uses a promise to return the result.
...
@@ -3052,7 +3052,7 @@ try {
...
@@ -3052,7 +3052,7 @@ try {
## sensor.getOrientation<sup>9+</sup>
## sensor.getOrientation<sup>9+</sup>
getOrientation(rotationMatrix: Array
<
number
>
, callback: AsyncCallback
<Array
&
lt
;
number
&
gt
;
>
): void
getOrientation(rotationMatrix: Array
<
number
>
, callback: AsyncCallback
<
Array
<
number
>>
): void
Obtains the device direction based on the rotation matrix. This API uses an asynchronous callback to return the result.
Obtains the device direction based on the rotation matrix. This API uses an asynchronous callback to return the result.
...
@@ -3101,7 +3101,7 @@ try {
...
@@ -3101,7 +3101,7 @@ try {
## sensor.getOrientation<sup>9+</sup>
## sensor.getOrientation<sup>9+</sup>
getOrientation(rotationMatrix: Array
<
number
>
): Promise
<Array
&
lt
;
number
&
gt
;
>
getOrientation(rotationMatrix: Array
<
number
>
): Promise
<
Array
<
number
>>
Obtains the device direction based on the rotation matrix. This API uses a promise to return the result.
Obtains the device direction based on the rotation matrix. This API uses a promise to return the result.
...
@@ -3193,7 +3193,7 @@ try {
...
@@ -3193,7 +3193,7 @@ try {
## sensor.getRotationMatrix<sup>9+</sup>
## sensor.getRotationMatrix<sup>9+</sup>
getRotationMatrix(gravity: Array
<
number
>
, geomagnetic: Array
<
number
>
,
): Promise
<
RotationMatrixResponse
>
getRotationMatrix(gravity: Array
<
number
>
, geomagnetic: Array
<
number
>
): Promise
<
RotationMatrixResponse
>
Obtains the rotation matrix based on a gravity vector and geomagnetic vector. This API uses a promise to return the result.
Obtains the rotation matrix based on a gravity vector and geomagnetic vector. This API uses a promise to return the result.
...
@@ -3239,7 +3239,7 @@ try {
...
@@ -3239,7 +3239,7 @@ try {
## sensor.getSensorList<sup>9+</sup>
## sensor.getSensorList<sup>9+</sup>
getSensorList(callback: AsyncCallback
<Array
&
lt
;
Sensor
&
gt
;
>
): void
getSensorList(callback: AsyncCallback
<
Array
<
Sensor
>>
): void
Obtains information about all sensors on the device. This API uses an asynchronous callback to return the result.
Obtains information about all sensors on the device. This API uses an asynchronous callback to return the result.
...
@@ -3249,7 +3249,7 @@ Obtains information about all sensors on the device. This API uses an asynchrono
...
@@ -3249,7 +3249,7 @@ Obtains information about all sensors on the device. This API uses an asynchrono
| Name | Type | Mandatory| Description |
| Name | Type | Mandatory| Description |
| -------- | ---------------------------------------------- | ---- | ---------------- |
| -------- | ---------------------------------------------- | ---- | ---------------- |
| callback | AsyncCallback
<Array
&
lt
;[
Sensor
](
#sensor9
)&
gt
;
>
| Yes | Callback used to return the sensor list.|
| callback | AsyncCallback
<
Array
<
[Sensor](#sensor9)
>>
| Yes | Callback used to return the sensor list.|
**Error code**
**Error code**
...
@@ -3279,7 +3279,7 @@ try {
...
@@ -3279,7 +3279,7 @@ try {
## sensor.getSensorList<sup>9+</sup>
## sensor.getSensorList<sup>9+</sup>
getSensorList(): Promise
<
Array
&
lt
;
Sensor
&
gt
;
>
getSensorList(): Promise
<
Array
<
Sensor
>>
Obtains information about all sensors on the device. This API uses a promise to return the result.
Obtains information about all sensors on the device. This API uses a promise to return the result.
...
@@ -3289,7 +3289,7 @@ Obtains information about all sensors on the device. This API uses a promise to
...
@@ -3289,7 +3289,7 @@ Obtains information about all sensors on the device. This API uses a promise to
| Name | Type | Mandatory| Description |
| Name | Type | Mandatory| Description |
| ------- | ---------------------------------------- | ---- | ---------------- |
| ------- | ---------------------------------------- | ---- | ---------------- |
| promise | Promise
<Array
&
lt
;[
Sensor
](
#sensor9
)&
gt
;
>
| Yes | Promise used to return the sensor list.|
| promise | Promise
<
Array
<
[Sensor](#sensor9)
>>
| Yes | Promise used to return the sensor list.|
**Error code**
**Error code**
...
@@ -3831,18 +3831,6 @@ Describes the geographical location.
...
@@ -3831,18 +3831,6 @@ Describes the geographical location.
| longitude | number | Yes | Yes | Longitude. |
| longitude | number | Yes | Yes | Longitude. |
| altitude | number | Yes | Yes | Altitude.|
| altitude | number | Yes | Yes | Altitude.|
## LocationOptions
Describes the geographical location.
**System capability**
: SystemCapability.Sensors.Sensor
| Name | Type | Readable | Writable | Description |
| --------- | ------ | -------- | -------- | ----------- |
| latitude | number | Yes | Yes | Latitude. |
| longitude | number | Yes | Yes | Longitude. |
| altitude | number | Yes | Yes | Altitude. |
## sensor.on<sup>(deprecated)</sup>
## sensor.on<sup>(deprecated)</sup>
### ACCELEROMETER<sup>(deprecated)</sup>
### ACCELEROMETER<sup>(deprecated)</sup>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录