-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Download different log formats #264
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this is long overdue.
vehicle_id = 1 # You can set this to the appropriate vehicle ID | ||
component_id = 1 # You can set this to the appropriate component ID | ||
version = "1.14.0 beta" # Set the version accordingly | ||
git_revision = "0099523710000000" # Set the Git revision accordingly | ||
|
||
self.write(f"# Onboard parameters for Vehicle {vehicle_id}\n") | ||
self.write("#\n") | ||
self.write(f"# Stack: PX4 Pro\n") | ||
self.write("# Vehicle: Multi-Rotor\n") | ||
self.write(f"# Version: {version}\n") | ||
self.write(f"# Git Revision: {git_revision}\n") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you get these from the log or remove altogether? I prefer having no info over something incorrect.
sys.path.append( | ||
os.path.join(os.path.dirname(os.path.realpath(__file__)), "../plot_app") | ||
) | ||
from helper import ( | ||
get_log_filename, | ||
validate_log_id, | ||
flight_modes_table, | ||
load_ulog_file, | ||
get_default_parameters, | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please avoid unrelated style changes (or minimally separate by commits. In this case there's CI to check the style)? It makes things hard to review.
rgb[i] += 40 | ||
if rgb[i] > 255: rgb[i] = 255 | ||
param_value = ulog.initial_parameters[param_key] | ||
param_type = "9" # Assuming the type is always "9" (FLOAT), you can modify it if needed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you get the proper type?
By this PR as proposed by @afwilkin in Ascend Engineering, we could add the capability of downloading .params format of the parameters since now the params can only be downloaded in raw formats. The user can have all RAW, txt and params format.
Below is the screenshot of what this PR could add already:
Reviews are highly appreciated.