From ba893aae53227a380d6312fe7ffedbaa8ae79ae2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beat=20K=C3=BCng?= Date: Tue, 5 Dec 2023 09:42:00 +0100 Subject: [PATCH] fix download: also change to qgc format for logs w/o default params --- app/tornado_handlers/download.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/app/tornado_handlers/download.py b/app/tornado_handlers/download.py index 484c5a2a6..5ebf1f115 100644 --- a/app/tornado_handlers/download.py +++ b/app/tornado_handlers/download.py @@ -162,9 +162,9 @@ def kml_colors(flight_mode): is_default = param_value == system_defaults[param_key] if not is_default: - self.write("1") + self.write("1") # sysid self.write(delimiter) - self.write("1") + self.write("1") # compid self.write(delimiter) self.write(param_key) self.write(delimiter) @@ -199,9 +199,22 @@ def kml_colors(flight_mode): is_default = int(default_param['default']) == int(param_value) if not is_default: + self.write("1") # sysid + self.write(delimiter) + self.write("1") # compid + self.write(delimiter) self.write(param_key) self.write(delimiter) self.write(param_value) + + #if the value is an int write a 6, if not write a 9 + if isinstance(param_value, int): + self.write(delimiter) + self.write("6") + else: + self.write(delimiter) + self.write("9") + self.write('\n') except: pass