From cd88693d5fd38b4da711dfdb6d6cc3073c648d42 Mon Sep 17 00:00:00 2001 From: "xjin.gao@quectel.com" Date: Wed, 17 May 2023 16:17:13 +0800 Subject: [PATCH] =?UTF-8?q?docs=20(ntptime=20&=20umqtt=20&=20uping):=20?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=9B=B8=E5=85=B3=E6=96=87=E6=A1=A3=E8=AF=B4?= =?UTF-8?q?=E6=98=8E=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 是否需要文案翻译: 是/否 --- docs/API_reference/zh/QuecPython_classlib/ntptime.md | 8 ++++++-- docs/API_reference/zh/QuecPython_classlib/umqtt.md | 2 +- docs/API_reference/zh/QuecPython_classlib/uping.md | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/API_reference/zh/QuecPython_classlib/ntptime.md b/docs/API_reference/zh/QuecPython_classlib/ntptime.md index 3ce55e78..8a25fdee 100644 --- a/docs/API_reference/zh/QuecPython_classlib/ntptime.md +++ b/docs/API_reference/zh/QuecPython_classlib/ntptime.md @@ -36,14 +36,18 @@ ntptime.sethost(host) ### `ntptime.settime` ```python -ntptime.settime(timezone=0) +ntptime.settime(timezone=0, use_rhost=1, timeout=10) ``` 同步ntp时间。 **参数描述:** -* `timezone` - 时区设置,默认为0, 范围 (-12~12),int类型 +* `timezone` - int类型,可选参数,时区设置,默认为0, 范围 (-12~12)。(-数为西时区,正数为东时区) + +* `use_rhost` - int类型,可选参数,ntptime.host 对时失败时,是否使用备用服务器继续尝试对时,默认为1,使用备用服务器,设为0时,仅使用ntptime.host对时。 + +* `timeout` - int类型,可选参数,socket网络请求超时时间(单位为秒),默认为10,范围:>0。 **返回值描述:** diff --git a/docs/API_reference/zh/QuecPython_classlib/umqtt.md b/docs/API_reference/zh/QuecPython_classlib/umqtt.md index a7ee8e95..06d13ced 100644 --- a/docs/API_reference/zh/QuecPython_classlib/umqtt.md +++ b/docs/API_reference/zh/QuecPython_classlib/umqtt.md @@ -27,7 +27,7 @@ class umqtt.MQTTClient(client_id, server, port=0, user=None, password=None, keep * `port` - 服务器端口(可选),int类型,默认为1883,请注意,MQTT over SSL/TLS的默认端口是8883 * `user` - (可选) 在服务器上注册的用户名 ,字符串类型 * `password` - (可选) 在服务器上注册的密码,字符串类型 -* `keepalive` - (可选)客户端的keepalive超时值,int类型,默认为0,范围(60~1200)s。 +* `keepalive` - (可选)客户端的keepalive超时值,int类型,默认为0。 * `ssl` - (可选)是否使能 SSL/TLS 支持 ,布尔值类型 * `ssl_params` - (可选)SSL/TLS 参数,字符串类型 * `reconn` - (可选)控制是否使用内部重连的标志,布尔值类型,默认开启为True diff --git a/docs/API_reference/zh/QuecPython_classlib/uping.md b/docs/API_reference/zh/QuecPython_classlib/uping.md index 6189a800..eb624e24 100644 --- a/docs/API_reference/zh/QuecPython_classlib/uping.md +++ b/docs/API_reference/zh/QuecPython_classlib/uping.md @@ -48,5 +48,5 @@ uping.ping(HOST, SOURCE=None, COUNT=4, INTERVAL=1000, SIZE=64, TIMEOUT=5000, qui - `INTERVAL` - 间隔时间,整型,用于绑定, 一般情况下不需要传。 - `SIZE` - 每次读取的包大小,整型,默认64, 无需修改。 - `TIMEOUT` - 超时时间,整型,单位:ms, 默认5000ms。 -- `quiet` - 打印是否直接输出,布尔类型,默认:false,打印直接输出。若设为True, 调用start默认打印的值会被转换成对象返回。 +- `quiet` - 打印是否直接输出,布尔类型,默认:False,打印直接输出。若设为True, 默认打印的值会被转换成对象返回。 -- Gitee