From e0e0dd550bd146b466d1a1fed9216dbfd45c5ef6 Mon Sep 17 00:00:00 2001 From: afwilkin Date: Mon, 30 Oct 2023 06:10:49 -0700 Subject: [PATCH 1/6] adding option for download in qgc format --- app/tornado_handlers/download.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/app/tornado_handlers/download.py b/app/tornado_handlers/download.py index 5d414021d..229880c7d 100644 --- a/app/tornado_handlers/download.py +++ b/app/tornado_handlers/download.py @@ -68,11 +68,24 @@ def get_original_filename(default_value, new_file_suffix): self.set_header("Content-Type", "text/plain") self.set_header('Content-Disposition', 'inline; filename=params.txt') - delimiter = ', ' + delimiter = ' ' for param_key in param_keys: + self.write("1") + self.write(delimiter) + self.write("1") + self.write(delimiter) self.write(param_key) self.write(delimiter) self.write(str(ulog.initial_parameters[param_key])) + + #if the value is an int write a 6, if not write a 9 + if(type(ulog.initial_parameters[param_key]) == int): + self.write(delimiter) + self.write("6") + else: + self.write(delimiter) + self.write("9") + self.write('\n') elif download_type == '2': # download the kml file From b23da9b9d53a5f83c7ca4a5fac3a009f57950e92 Mon Sep 17 00:00:00 2001 From: afwilkin Date: Wed, 1 Nov 2023 16:55:36 -0700 Subject: [PATCH 2/6] adding QGC compatible parameters --- app/plot_app/templates/header.html | 2 + app/tornado_handlers/download.py | 85 ++++++++++++++++++++++++------ 2 files changed, 72 insertions(+), 15 deletions(-) diff --git a/app/plot_app/templates/header.html b/app/plot_app/templates/header.html index d7228fd09..8cb0679bc 100644 --- a/app/plot_app/templates/header.html +++ b/app/plot_app/templates/header.html @@ -56,7 +56,9 @@