mirror of
https://github.com/liberatedsystems/openCom-Companion.git
synced 2024-11-25 14:50:37 +01:00
Fixed stale time updates on fixed location
This commit is contained in:
parent
fef618f96c
commit
237f6693f7
@ -2348,7 +2348,10 @@ class SidebandCore():
|
|||||||
self.telemeter.sensors["location"].latitude = self.config["telemetry_s_fixed_latlon"][0]
|
self.telemeter.sensors["location"].latitude = self.config["telemetry_s_fixed_latlon"][0]
|
||||||
self.telemeter.sensors["location"].longitude = self.config["telemetry_s_fixed_latlon"][1]
|
self.telemeter.sensors["location"].longitude = self.config["telemetry_s_fixed_latlon"][1]
|
||||||
self.telemeter.sensors["location"].altitude = self.config["telemetry_s_fixed_altitude"]
|
self.telemeter.sensors["location"].altitude = self.config["telemetry_s_fixed_altitude"]
|
||||||
self.telemeter.sensors["location"].stale_time = 30
|
self.telemeter.sensors["location"].stale_time = 12*60*60
|
||||||
|
|
||||||
|
if time.time() > self.telemeter.sensors["location"].last_update + self.telemeter.sensors["location"].stale_time:
|
||||||
|
self.telemeter.sensors["location"].update_data()
|
||||||
|
|
||||||
if self.config["telemetry_s_information"]:
|
if self.config["telemetry_s_information"]:
|
||||||
self.telemeter.synthesize("information")
|
self.telemeter.synthesize("information")
|
||||||
@ -2592,6 +2595,7 @@ class SidebandCore():
|
|||||||
if self.is_service or self.is_standalone:
|
if self.is_service or self.is_standalone:
|
||||||
while True:
|
while True:
|
||||||
time.sleep(SidebandCore.PERIODIC_JOBS_INTERVAL)
|
time.sleep(SidebandCore.PERIODIC_JOBS_INTERVAL)
|
||||||
|
if self.owner_service != None:
|
||||||
self.owner_service.update_location_provider()
|
self.owner_service.update_location_provider()
|
||||||
|
|
||||||
if self.config["lxmf_periodic_sync"] == True:
|
if self.config["lxmf_periodic_sync"] == True:
|
||||||
|
Loading…
Reference in New Issue
Block a user