demo.tracker-v2/code/settings_loc.py

66 lines
1.6 KiB
Python
Raw Permalink Normal View History

2022-04-14 17:58:03 +08:00
# 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.
from machine import UART
class LocConfig(object):
class _gps_mode(object):
none = 0x0
internal = 0x1
external = 0x2
class _map_coordinate_system(object):
WGS84 = "WGS84"
GCJ02 = "GCJ02"
class _gps_sleep_mode(object):
none = 0x0
pull_off = 0x1
backup = 0x2
standby = 0x3
2022-04-14 17:58:03 +08:00
profile_idx = 1
2022-12-21 15:25:53 +08:00
map_coordinate_system = _map_coordinate_system.WGS84
gps_sleep_mode = _gps_sleep_mode.none
gps_cfg = {
"UARTn": UART.UART2,
2022-04-14 17:58:03 +08:00
"buadrate": 115200,
"databits": 8,
"parity": 0,
"stopbits": 1,
"flowctl": 0,
2022-12-21 15:25:53 +08:00
"gps_mode": _gps_mode.external,
"nmea": 0b010111,
2022-04-27 17:49:59 +08:00
"PowerPin": None,
"StandbyPin": None,
2022-07-26 15:06:57 +08:00
"BackupPin": None,
2022-04-14 17:58:03 +08:00
}
2022-12-21 15:25:53 +08:00
cell_cfg = {
2022-04-14 17:58:03 +08:00
"serverAddr": "www.queclocator.com",
"port": 80,
"token": "xGP77d2z0i91s67n",
"timeout": 3,
"profileIdx": profile_idx,
}
2022-12-21 15:25:53 +08:00
wifi_cfg = {
2022-04-14 17:58:03 +08:00
"token": "xGP77d2z0i91s67n"
}