ArduPilot / ArduPilot/MissionPlanner
Minor bug in code for graphs in telemetry logs
- Dominant language
- C#
- Stars
- 2.4k
- Forks
- 2.9k
- Avg merge
- 19h 16m
- Merged PRs (30d)
- 4
Description
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.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.