mirror of
https://gitee.com/qpy-solutions/tracker-v2.git
synced 2025-05-19 19:18:25 +08:00
update: gps sleep method
This commit is contained in:
parent
188991a931
commit
cbe51169d0
@ -1 +1 @@
|
|||||||
Subproject commit 853e2ccafe0a6a715bfd86f4134759ecdbf00c16
|
Subproject commit a35456c05c1115b5f8e63c1208b77f649d97d8a3
|
@ -189,7 +189,7 @@ class Collector(Singleton):
|
|||||||
def __locator_gps_hibernation_strategy(self, onoff):
|
def __locator_gps_hibernation_strategy(self, onoff):
|
||||||
"""Set GPS sleep"""
|
"""Set GPS sleep"""
|
||||||
current_settings = settings.get()
|
current_settings = settings.get()
|
||||||
work_cycle_period = current_settings["UserConfig"]["work_cycle_period"]
|
work_cycle_period = current_settings["user_cfg"]["work_cycle_period"]
|
||||||
if self.__locator.gps:
|
if self.__locator.gps:
|
||||||
if work_cycle_period >= 3600:
|
if work_cycle_period >= 3600:
|
||||||
self.__locator.gps.power_switch(onoff)
|
self.__locator.gps.power_switch(onoff)
|
||||||
@ -412,6 +412,7 @@ class Collector(Singleton):
|
|||||||
device_data = {
|
device_data = {
|
||||||
"power_switch": power_switch,
|
"power_switch": power_switch,
|
||||||
"local_time": self.__get_local_time(),
|
"local_time": self.__get_local_time(),
|
||||||
|
"gps_mode": current_settings["LocConfig"]["gps_mode"],
|
||||||
}
|
}
|
||||||
|
|
||||||
# Get ota status & drive behiver code
|
# Get ota status & drive behiver code
|
||||||
|
@ -617,7 +617,7 @@
|
|||||||
"dataType": {
|
"dataType": {
|
||||||
"type": "int",
|
"type": "int",
|
||||||
"specs": {
|
"specs": {
|
||||||
"min": "0",
|
"min": "3600",
|
||||||
"max": "2147483647",
|
"max": "2147483647",
|
||||||
"unit": "s",
|
"unit": "s",
|
||||||
"unitName": "秒",
|
"unitName": "秒",
|
||||||
@ -1203,7 +1203,7 @@
|
|||||||
"dataType": {
|
"dataType": {
|
||||||
"type": "int",
|
"type": "int",
|
||||||
"specs": {
|
"specs": {
|
||||||
"min": "0",
|
"min": "3600",
|
||||||
"max": "2147483647",
|
"max": "2147483647",
|
||||||
"unit": "s",
|
"unit": "s",
|
||||||
"unitName": "秒",
|
"unitName": "秒",
|
||||||
@ -1556,7 +1556,7 @@
|
|||||||
"dataType": {
|
"dataType": {
|
||||||
"type": "int",
|
"type": "int",
|
||||||
"specs": {
|
"specs": {
|
||||||
"min": "0",
|
"min": "3600",
|
||||||
"max": "2147483647",
|
"max": "2147483647",
|
||||||
"unit": "s",
|
"unit": "s",
|
||||||
"unitName": "秒",
|
"unitName": "秒",
|
||||||
@ -2173,7 +2173,7 @@
|
|||||||
"dataType": {
|
"dataType": {
|
||||||
"type": "int",
|
"type": "int",
|
||||||
"specs": {
|
"specs": {
|
||||||
"min": "0",
|
"min": "3600",
|
||||||
"max": "2147483647",
|
"max": "2147483647",
|
||||||
"unit": "s",
|
"unit": "s",
|
||||||
"unitName": "秒",
|
"unitName": "秒",
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"profile":{
|
"profile":{
|
||||||
"tslVersion":"1.1.0",
|
"tslVersion":"1.1.0",
|
||||||
"productKey":"p11275",
|
"productKey":"p11275",
|
||||||
"version":"20220428155940369"
|
"version":"20220526133940091"
|
||||||
},
|
},
|
||||||
"properties":[
|
"properties":[
|
||||||
{
|
{
|
||||||
@ -808,22 +808,6 @@
|
|||||||
"type":"PROPERTY",
|
"type":"PROPERTY",
|
||||||
"desc":""
|
"desc":""
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"specs":{
|
|
||||||
"unit":"s",
|
|
||||||
"min":"0",
|
|
||||||
"max":"2147483647",
|
|
||||||
"step":"1"
|
|
||||||
},
|
|
||||||
"code":"work_mode_timeline",
|
|
||||||
"dataType":"INT",
|
|
||||||
"name":"休眠策略参考时间",
|
|
||||||
"subType":"RW",
|
|
||||||
"id":44,
|
|
||||||
"sort":35,
|
|
||||||
"type":"PROPERTY",
|
|
||||||
"desc":""
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"specs":{
|
"specs":{
|
||||||
"unit":"s",
|
"unit":"s",
|
||||||
@ -839,6 +823,22 @@
|
|||||||
"sort":36,
|
"sort":36,
|
||||||
"type":"PROPERTY",
|
"type":"PROPERTY",
|
||||||
"desc":"-1:一直等待直到读取到数据才进行返回\n0:不等待,读取接口返回数据后立即返回\n>0: 等待超时时间,单位秒"
|
"desc":"-1:一直等待直到读取到数据才进行返回\n0:不等待,读取接口返回数据后立即返回\n>0: 等待超时时间,单位秒"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"specs":{
|
||||||
|
"unit":"s",
|
||||||
|
"min":"3600",
|
||||||
|
"max":"2147483647",
|
||||||
|
"step":"1"
|
||||||
|
},
|
||||||
|
"code":"work_mode_timeline",
|
||||||
|
"dataType":"INT",
|
||||||
|
"name":"休眠策略参考时间",
|
||||||
|
"subType":"RW",
|
||||||
|
"id":1,
|
||||||
|
"sort":37,
|
||||||
|
"type":"PROPERTY",
|
||||||
|
"desc":""
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"events":[
|
"events":[
|
||||||
|
Loading…
x
Reference in New Issue
Block a user