Fixed return on non-init

This commit is contained in:
Mark Qvist 2023-10-21 11:59:18 +02:00
parent a0b97bf4a3
commit 5a1eb23b0a
1 changed files with 11 additions and 5 deletions

View File

@ -1586,13 +1586,19 @@ class SidebandCore():
self.telemeter.disable(sensor)
def get_telemetry(self):
self.update_telemeter_config()
return self.telemeter.read_all()
if self.config["telemetry_enabled"] == True:
self.update_telemeter_config()
return self.telemeter.read_all()
else:
return {}
def get_packed_telemetry(self):
self.update_telemeter_config()
packed = self.telemeter.packed()
return packed
if self.config["telemetry_enabled"] == True:
self.update_telemeter_config()
packed = self.telemeter.packed()
return packed
else:
return None
def is_known(self, dest_hash):
try: