未验证 提交 48f97169 编写于 作者: 李贤 提交者: Gitee

【OpenHarmony开源贡献者计划2022】update zh-cn/application-dev/device/sensor-guidelines.md.注释格式修改

注释格式修改

Signed-off-by: xianlik<xianlik@isoftstone.com>
上级 9b647701
......@@ -87,7 +87,7 @@
```
import sensor from "@ohos.sensor"
sensor.on(sensor.sensorType.SENSOR_TYPE_ACCELEROMETER,function(data){
console.info("Subscription succeeded. data = " + data);//调用成功,打印对应传感器的数据
console.info("Subscription succeeded. data = " + data);// 调用成功,打印对应传感器的数据
}
);
```
......@@ -101,7 +101,7 @@
```
import sensor from "@ohos.sensor"
sensor.off(sensor.sensorType.SENSOR_TYPE_ACCELEROMETER,function() {
console.info("Succeeded in unsubscribing from acceleration sensor data.");//注销成功,返回打印结果
console.info("Succeeded in unsubscribing from acceleration sensor data.");// 注销成功,返回打印结果
}
);
```
......@@ -115,7 +115,7 @@
```
import sensor from "@ohos.sensor"
sensor.once(sensor.sensorType.SENSOR_TYPE_ACCELEROMETER,function(data) {
console.info("Data obtained successfully. data=" + data);//获取数据成功,打印对应传感器的数据
console.info("Data obtained successfully. data=" + data);// 获取数据成功,打印对应传感器的数据
}
);
```
......@@ -129,7 +129,7 @@
```
try {
sensor.once(sensor.sensorType.SENSOR_TYPE_ACCELEROMETER,function(data) {
console.info("Data obtained successfully. data=" + data);//获取数据成功,打印对应传感器的数据
console.info("Data obtained successfully. data=" + data);// 获取数据成功,打印对应传感器的数据
});
} catch (error) {
console.error(error);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册