mirror of
https://gitee.com/qpy-solutions/tracker-v2.git
synced 2025-05-18 18:48:25 +08:00
update: work mode choice method
This commit is contained in:
parent
3905712304
commit
fad941169d
@ -85,24 +85,21 @@ class PowerManage(Singleton):
|
||||
self.low_energy_queue.put('power_dwon')
|
||||
|
||||
def get_low_energy_method(self):
|
||||
current_settings = settings.get()
|
||||
device_model = modem.getDevModel()
|
||||
support_methds = LOWENERGYMAP.get(device_model)
|
||||
if not support_methds:
|
||||
raise SettingsError('This Model %s Not Set LOWENERGYMAP.' % device_model)
|
||||
|
||||
if self.period >= 3600:
|
||||
if "POWERDOWN" in support_methds:
|
||||
self.low_energy_method = "POWERDOWN"
|
||||
elif "PSM" in support_methds:
|
||||
self.low_energy_method = "PSM"
|
||||
elif "PM" in support_methds:
|
||||
self.low_energy_method = "PM"
|
||||
elif 60 <= self.period < 3600:
|
||||
if self.period >= current_settings['sys']['work_mode_timeline']:
|
||||
if "PSM" in support_methds:
|
||||
self.low_energy_method = "PSM"
|
||||
elif "POWERDOWN" in support_methds:
|
||||
self.low_energy_method = "POWERDOWN"
|
||||
elif "PM" in support_methds:
|
||||
self.low_energy_method = "PM"
|
||||
elif self.period < 60:
|
||||
self.low_energy_method = "PM"
|
||||
else:
|
||||
if "PM" in support_methds:
|
||||
self.low_energy_method = "PM"
|
||||
|
||||
|
@ -211,6 +211,8 @@ class default_values_sys(object):
|
||||
|
||||
cloud_timeout = 180
|
||||
|
||||
work_mode_timeline = 3600
|
||||
|
||||
ali_burning_method = _ali_burning_method.one_machine_one_density
|
||||
|
||||
_quecIot = {
|
||||
|
@ -55,9 +55,8 @@
|
||||
2. 语音监听时
|
||||
3. 录音时
|
||||
- 根据不同的应用场景,上报工作模式分别有以下三种:
|
||||
1. 周期性模式 -- 周期性上报设备信息
|
||||
2. 智能模式 -- 开启GPS定位时,运动上报,静止不上报,可设置周期
|
||||
3. 低功耗模式(开发中) -- 周期性开机后上报设备信息,上报完成后关机
|
||||
1. 周期性模式 -- 周期性上报设备信息,上报完成后进入低功耗模式
|
||||
2. 智能模式 -- 开启GPS定位时,运动上报,上报完成后进入低功耗模式,静止不上报直接进入低功耗模式
|
||||
- 上报工作模式与上报周期,由云端或手机APP控制,默认周期性上报,上报周期30秒。
|
||||
|
||||
#### OTA升级(开发中)
|
||||
@ -96,7 +95,7 @@
|
||||
- 功能的开启,超速阈值,可由云端或手机APP控制。默认关闭该功能。
|
||||
- 报警代码:30003
|
||||
|
||||
#### 拔卡报警(开发中)
|
||||
#### 拔卡报警
|
||||
|
||||
- SIM卡拔出时报警,此时网络不通,按照网络不通的逻辑处理。
|
||||
- 功能的开启,可由云端或手机APP控制。默认开启该功能。
|
||||
|
Loading…
x
Reference in New Issue
Block a user