- From the tab page "Telemetry Logs", in Flight Data, click the button to display graphs.
- In the Log window that appears click on the "Graph Log" button.
- Choose a telemetry log file.
- 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_".
- 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.
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.