Skip to content

Commit

Permalink
fix download: also change to qgc format for logs w/o default params
Browse files Browse the repository at this point in the history
  • Loading branch information
bkueng committed Dec 5, 2023
1 parent 31a4915 commit ba893aa
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions app/tornado_handlers/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit ba893aa

Please sign in to comment.