Skip to content
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

Closed

Conversation

farhangnaderi
Copy link

@farhangnaderi farhangnaderi commented Aug 21, 2023

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:

image

Reviews are highly appreciated.

Copy link
Member

@bkueng bkueng left a 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.

Comment on lines +79 to +89
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")
Copy link
Member

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.

Comment on lines +16 to +25
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,
)
Copy link
Member

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
Copy link
Member

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?

@afwilkin afwilkin mentioned this pull request Nov 1, 2023
@bkueng bkueng closed this Dec 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants