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

MAVLink Inspector, show all selected fields in the chart #12342

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mykhailopylyp
Copy link

Description

Currently, if I select ATTITUDE.roll, the data is displayed on the chart. However, if I switch to another message (e.g., RAW_IMU), the ATTITUDE.roll data stops rendering. It would be more intuitive if all selected fields (even from different messages) were shown on the chart simultaneously.

Screenshot from 2025-01-18 12-40-02

For example, I want to investigate the correlation between ATTITUDE.roll and RAW_IMU.xacc.

I investigated why this approach was implemented and couldn't find a specific reason preventing us from displaying multiple fields from different messages simultaneously.

Test Steps

  • Make sure QGC is connected to a drone that is in flight
  • Go to MAVLink Inspector
  • Select ATTITUDE.roll
  • Switch to another message (For example RAW_IMU)
  • Observer that ATTITUDE.roll is still rendered on the chart

Checklist:

Related Issue

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@@ -108,7 +108,7 @@ void QGCMAVLinkMessage::update(const mavlink_message_t &message)
_count++;
_message = message;

if (_selected) {
if (_selected || _fieldSelected) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, interesting. Shouldn't this just be _fieldSelected? Since the message might be selected but that doesn't mean that a field is selected. Otherwise you end up doing a bunch of work in updateField every time you select a new top level message. Or am I reading the code wrong?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, _selected is not needed. It's not a big overhead though because there's only one message selected at the time.

Do you want me to remove _selected from the if statement?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you should remove it. Make the code clearer to others looking at it later.

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