-
Notifications
You must be signed in to change notification settings - Fork 221
Filter effective parameter changes and fix actuator controls topic instance handling #327
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
Conversation
3027cca to
b1cfa86
Compare
|
Nice.
PX4 already checks for identical parameter changes: https://github.com/PX4/PX4-Autopilot/blob/main/src/lib/parameters/parameters.cpp#L431 diff --git a/src/lib/parameters/parameters.cpp b/src/lib/parameters/parameters.cpp
index 560d6eec82..772a5c2a9e 100644
--- a/src/lib/parameters/parameters.cpp
+++ b/src/lib/parameters/parameters.cpp
@@ -438,7 +438,7 @@ param_set_internal(param_t param, const void *val, bool mark_saved, bool notify_
}
if (user_config.store(param, new_value)) {
- params_unsaved.set(param, !mark_saved);
+ params_unsaved.set(param, !mark_saved && param_changed);
result = PX4_OK;
} else {
That makes sense. Can you squash the first 2 commits? |
1e7dff8 to
c2914f9
Compare
That would be great.
It looks great.
I squashed the first two commits into one and dropped the last commit, since the issue was already fixed elsewhere. |
|
The request has been processed, please review. @bkueng |
|
Thanks for testing. Did you create a pull request to PX4 already? There's a minor CI failure, the line is a bit too long: |
c2914f9 to
e222d21
Compare
bkueng
left a comment
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.
Looks good


This PR improves the robustness of Flight Review plotting in two aspects:
Parameter change visualization:
(e.g. repeated
param setwith identical values).(initial value or last update), avoiding misleading annotations such as
identical CAL_* parameters being shown as changes.
Actuator controls plotting:
topic_instancefor actuator controls.ActuatorControls.topic_instanceinstead of hard-coded instance values.
dynamic control allocation (vehicle_torque/thrust_setpoint) and
legacy actuator_controls_* topics.
These changes improve correctness and compatibility without altering
existing plot behavior for valid data.
Before/after plots are attached for comparison.
1.Parameter change visualization:
Before:

After:

2.Fix actuator_controls_1 torque plot not showing due to incorrect topic instance selection.
Before:
After: