demo.dtu/settings_user.py
elian.wang 725b8538c1 1.修改部分变量命名,类内不对外的属性名前增加双下划线"__"
2.修改DtuDataProcess类中不同工作模式的设置
3.修改ModbusMode初始化
4.删除测试log,修改heartbeat_time变量命名
2022-06-06 20:28:16 +08:00

62 lines
1.7 KiB
Python

# Copyright (c) Quectel Wireless Solution, Co., Ltd.All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
class UserConfig(object):
password = ""
conf = {"1": {
"protocol": "http",
"request": {"1":{"method":"get", "url":"http://220.180.239.212:18011/test"}},
"reg_data": "",
"serialID": 2
}
}
reg = 0
convert = 0
nolog = 0
message = {}
uconf = {"2": {
"baudrate": "115200",
"databits": "8",
"parity": "0",
"stopbits": "1",
"flowctl": "0"
}
}
fota = 1
ota = 1
pins = ["", "", ""]
direction_pin = {}
apn = ["", "", ""]
work_mode = "command"
auto_connect = 1
offline_storage = True
modbus = {
"groups":
[
{
"device_type": "temp_humid_sensor",
"device_model": "TH10S-B",
"slave_address":["0x01"]
},
{
"device_type": "light_sensor",
"device_model": "YGC-BG-M",
"slave_address":["0x02", "0x03"]
}
]
}