-
Notifications
You must be signed in to change notification settings - Fork 691
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
MAVExplorer: Update lookups for EV & ERR messages #1320
MAVExplorer: Update lookups for EV & ERR messages #1320
Conversation
Lookups for subsystems and events aligned to AP_Logger.h. Reworked lookup table for subsystem-specific codes, so that they can be displayed. Some have specific messages, some need to continue to display number (EKF_PRIMARY, FLIGHT_MODE, FAILSAFE_FENCE), and others use generic codes.
16162ea
to
859860c
Compare
Ah, that may scupper this cunning plan! 3 options I can see:
The last force-push does the 3rd option, by having things like this in the table:
But thinking about it, 2nd option may be safer, in case someone adds a new subsystem in the future which needs to show numbers, but by default will show the generic code strings. |
For info, the 3rd option would look like this - tested by manually adding some extra messages into the end of a DF text log:
|
Well, there's option number four, which is, "fix ArduPilot" :-) I might also mention that I do want o get down the log message metadata into MAVExplorer.py - that would allow us to do without this static list which gets out of date, and allow for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Merged, thanks! |
Yes! That would be good! ... I'd been thinking about it too recently.... as well as the 2 things you mentioned (avoiding out-of-date hard-coded lists, and some sort of "msghelp" or "logmessage help" command), I had 2 other things in mind:
What I wasn't sure about was how the XML data gets in... auto-download when needed, user need to do "logmessage download" to get the extras, magic inclusion in pymavlink pip package.... |
On Sat, 10 Feb 2024, Simon Hancock wrote:
What I wasn't sure about was how the XML data gets in... auto-download when needed, user need to do "logmessage download" to get the extras, magic inclusion in pymavlink pip package....
We already do something very similar for "param help". So "more of the
same", probably :-)
|
This PR updates the MAVExplorer lookup tables for events (as used on EV messages) and subsystems (as used on ERR messages), to align with the latest list in AP_Logger.h.
I have also re-worked the lookup table of subsystem-specific error codes, to allow them to be included when running the 'messages' command. Note that the previous list was unused, and only the number was shown.
The list now uses the subsystem name (with optional wildcard) to select the relevant set of susbsytem-specific codes, falling through to the generic ones if necessary, and showing the number if all else fails.
Example output from testing with ArduSub-ArmFeatures-00000003.BIN from Autotest:
The difference is that previously the text following ECode would have been just a number.