Fixed info telemetry field not updating immediately after settings change
This commit is contained in:
parent
d3a27f4121
commit
8375ea224a
|
@ -2518,7 +2518,7 @@ class SidebandCore():
|
|||
|
||||
if self.config["telemetry_s_information"]:
|
||||
self.telemeter.synthesize("information")
|
||||
self.telemeter.sensors["information"].contents = self.config["telemetry_s_information_text"]
|
||||
self.telemeter.sensors["information"].set_contents(self.config["telemetry_s_information_text"])
|
||||
|
||||
else:
|
||||
self.telemeter = None
|
||||
|
|
|
@ -331,6 +331,10 @@ class Information(Sensor):
|
|||
def update_data(self):
|
||||
self.data = {"contents":str(self.contents)}
|
||||
|
||||
def set_contents(self, contents):
|
||||
self.contents = contents
|
||||
self.update_data()
|
||||
|
||||
def pack(self):
|
||||
if self.data == None:
|
||||
return None
|
||||
|
|
|
@ -436,12 +436,13 @@ class Telemetry():
|
|||
self.app.sideband.config["telemetry_s_proximity"] = self.sensors_screen.ids.telemetry_s_proximity.active
|
||||
|
||||
if self.app.sideband.config["telemetry_s_information"] != self.sensors_screen.ids.telemetry_s_information.active:
|
||||
self.app.sideband.config["telemetry_s_information"] = self.sensors_screen.ids.telemetry_s_information.active
|
||||
run_telemetry_update = True
|
||||
self.app.sideband.config["telemetry_s_information"] = self.sensors_screen.ids.telemetry_s_information.active
|
||||
|
||||
if self.app.sideband.config["telemetry_s_information_text"] != self.sensors_screen.ids.telemetry_s_information_text.text:
|
||||
self.app.sideband.config["telemetry_s_information_text"] = self.sensors_screen.ids.telemetry_s_information_text.text
|
||||
run_telemetry_update = True
|
||||
self.app.sideband.config["telemetry_s_information_text"] = self.sensors_screen.ids.telemetry_s_information_text.text
|
||||
|
||||
|
||||
try:
|
||||
alt = float(self.sensors_screen.ids.telemetry_s_fixed_altitude.text.strip().replace(" ", ""))
|
||||
|
|
Loading…
Reference in New Issue