-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathsettings_loc.py
More file actions
73 lines (60 loc) · 1.75 KB
/
settings_loc.py
File metadata and controls
73 lines (60 loc) · 1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# 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.
"""
@file :dev_settings_loc.py
@author :Jack Sun (jack.sun@quectel.com)
@brief :Loction config.
@version :2.2.0
@date :2022-10-31 14:42:25
@copyright :Copyright (c) 2022
"""
from machine import UART
class LocConfig:
class _gps_mode:
internal = 0x1
external_uart = 0x2
external_i2c = 0x3
class _map_coordinate_system:
WGS84 = "WGS84"
GCJ02 = "GCJ02"
class _gps_sleep_mode:
none = 0x0
pull_off = 0x1
backup = 0x2
standby = 0x3
profile_idx = 1
map_coordinate_system = _map_coordinate_system.GCJ02
gps_sleep_mode = _gps_sleep_mode.none
gps_cfg = {
"gps_mode": _gps_mode.internal,
"UARTn": UART.UART2,
"buadrate": 115200,
"databits": 8,
"parity": 0,
"stopbits": 1,
"flowctl": 0,
"PowerPin": None,
"StandbyPin": None,
"BackupPin": None,
}
cell_cfg = {
"serverAddr": "www.queclocator.com",
"port": 80,
"token": "xxxxxxxxxx",
"timeout": 3,
"profileIdx": profile_idx,
}
wifi_cfg = {
"token": "xxxxxxxxxx"
}