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.
Solved Problem
Like @Igor-Misic and me almost simultaneously found out the motor slew rate does not take effect anymore in the dynamic control allocation which is what the mixer now uses for some time:
#23794
#23798
I would have been fine with that since I don't think there should be a slew rate on the motor outputs but the ESCs should deal with the feasibility of commands. But in practise they apparently do not always do that and since there are users of this feature I don't want to leave it away.
Solution
MOT_SLEW_MAX
parameter with its original meaning but a new PWM independent description for backward compatibility. The slew rate reinitializes when there are NAN values in the motor command so they could in theory still jump from NAN to a different value since the motor function does not know what NAN (output protol-specific disarmed value) maps to.Changelog Entry
Alternatives
I would suggest not to use this feature if not urgently necessary but rather make sure:
a) the ESC keeps up stable operation no matter what
b) the sensor noise is filtered adequately to not propagate problems
c) the setpoints are smooth such that there are no crazy jumps in normal operation
Test coverage
SITL SIH test checking that the timing e.g. 10 seconds from -1 to 1 is correct and the initialization in case of NAN values works.
Real vehicle test to see that on PWM as well as CAN output the same slew rate is percievably in action.