Skip to content

Minor bug in code for graphs in telemetry logs #3736

Description

@aether-aero
  1. From the tab page "Telemetry Logs", in Flight Data, click the button to display graphs.
  2. In the Log window that appears click on the "Graph Log" button.
  3. Choose a telemetry log file.
  4. After the log file is loaded you get plenty of fields on the right with a cross to expand them. I have programmed ArduPilot to return/send certain custom fields back to Mission Planner via MAVLink. These fields appear in the graph under NAMED_VALUE_FLOAT and they are all aggregated under the field "value". I updated the code to separate them and display each field in order to get a graph per custom field. Each field is prefixed with "MAV_".
  5. Long story short, if I check multiple custom fields, i.e., MAV_*, the graph of each overlaps with the graph of the others. This is correct but when I uncheck one custom field the graph of the rest is not updated because the axis scale is never recomputed after curves are removed.

This is a bug and not related to custom fields only. To fix it, in MavlinkLog.cs, in treeView1_NodeMouseClick(), replace

zg1.Invalidate();

with

zg1.AxisChange();
zg1.Invalidate();

Also, in the same file there are two more places where zg1.Invalidate() is called but in the wrong order, i.e.,

zg1.Invalidate();
zg1.AxisChange();

The call order should be switched. You have to update the axis first and then invalidate; not the other way around.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions