mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-07 03:30:36 +08:00
Simple mixer: add output slew rate
This adds the option to limit the rate of change (slew rate) of an output that's mixed by a simple mixer. To enable it, a positive number has to be added at the end (6th number) of the output scaler line of the mixer, specifying the min rise time of this output. E.g. O: 10000 10000 0 -10000 10000 20000 for a rise time of 2s, resp. a max slew rate of 0.5s^-1. Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
committed by
Lorenz Meier
parent
98cff94702
commit
7c727edc3f
@@ -304,6 +304,9 @@ mixer_tick()
|
||||
mixer_group.set_max_delta_out_once(delta_out_max);
|
||||
}
|
||||
|
||||
/* set dt to be used in simple mixer for slew rate limiting */
|
||||
mixer_group.set_dt_once(dt);
|
||||
|
||||
/* update parameter for mc thrust model if it updated */
|
||||
if (update_mc_thrust_param) {
|
||||
mixer_group.set_thrust_factor(REG_TO_FLOAT(r_setup_thr_fac));
|
||||
@@ -657,6 +660,9 @@ mixer_set_failsafe()
|
||||
mixer_group.set_max_delta_out_once(delta_out_max);
|
||||
}
|
||||
|
||||
/* set dt to be used in simple mixer for slew rate limiting */
|
||||
mixer_group.set_dt_once(dt);
|
||||
|
||||
/* update parameter for mc thrust model if it updated */
|
||||
if (update_mc_thrust_param) {
|
||||
mixer_group.set_thrust_factor(REG_TO_FLOAT(r_setup_thr_fac));
|
||||
|
||||
Reference in New Issue
Block a user