Skip to content

Commit f0e5b49

Browse files
committed
SoftStart Fix for engaging from nose-down
When mounting "backwards," coming up to level from a nose down position, Soft Start would not function correctly and you would get the older harsh engagement. This is now accounted for.
1 parent d408059 commit f0e5b49

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

float/float/float.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1812,7 +1812,7 @@ static void float_thd(void *arg) {
18121812
pid_mod += d->applied_booster_current;
18131813

18141814
if (d->float_conf.startup_softstart_enabled && (d->softstart_pid_limit < d->mc_current_max)) {
1815-
pid_mod = fminf(pid_mod, d->softstart_pid_limit);
1815+
pid_mod = fminf(fabs(pid_mod), d->softstart_pid_limit) * SIGN(pid_mod);
18161816
d->softstart_pid_limit += d->softstart_ramp_step_size;
18171817
}
18181818

0 commit comments

Comments
 (0)