-
Notifications
You must be signed in to change notification settings - Fork 18.2k
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
Plane: log whether throttle is suppressed or not #28906
Conversation
I like the idea of a more compact logging of logic flags. Smaller logs is always better. But as it stands, it would make reading the logs (e.g. via MAVExplorer) much harder. |
MissionPlanner already has a good interface for this - as do the web tools IIUC. MAVExplorer you can log the bits with |
f94c5fd
to
a4d852a
Compare
ArduPlane/Log.cpp
Outdated
is_flying : status.get(LogStatus::Bit::IS_FLYING), | ||
is_flying_probability : isFlyingProbability, | ||
armed : status.get(LogStatus::Bit::ARMED), | ||
safety : static_cast<uint8_t>(hal.util->safety_switch_state()), |
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.
Why not have safety state in the bitmask?
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.
Three states and comes from an enumeration. We've done that before in copter's ap
and it sucked
a4d852a
to
1f3c265
Compare
Merging as agreed at DevCall. |
This adds logging of whether the throttle is suppressed or not into the
STAT
message.I've created a new field, "Bit" to hold a bitmask of boolean information about the vehicle - saves 40 bytes per message past me adding the new field.
I suggest we remove the old equivalent uint8_t fields in 4.8 - just have them in here for a bit of cross-over.
The new LogStatus class is perhaps overkill - but I think we might be able to templatise it and have a nice, compact way of doing similar bitmasks in log messages.
For this entire PR:
Without the new column, just with the weird class and consolidating into status, removing the old fields: