MAVExplorer: Fix stats command for DF text and TLOG logs #1309
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When looking at something else, I noticed that when using the 'stats' command in MAVExplorer with either DF text logs or TLOGs it raises an Exception for different reasons.
KeyError: 128
ERROR in command []: 'mavmmaplog' object has no attribute 'filehandle'
It looks like TLOGs were not supported, but should at least have given a nicer error message. But while here, I have added the support for them.
Summary of changes needed:
For DF text logs:
For TLOG:
The new output for TLogs looks something like this (abbreviated):
I've tested files of all three types (bin, log, tlog), and checked stats command works in each case.