mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-30 01:54:06 +08:00
mc_att_control: reduce minimum required dt
2ms is not enough to run at 1kHz
This commit is contained in:
parent
d552c2a362
commit
fc997dd0d5
@ -703,9 +703,9 @@ MulticopterAttitudeControl::run()
|
||||
float dt = (now - last_run) / 1e6f;
|
||||
last_run = now;
|
||||
|
||||
/* guard against too small (< 2ms) and too large (> 20ms) dt's */
|
||||
if (dt < 0.002f) {
|
||||
dt = 0.002f;
|
||||
/* guard against too small (< 0.2ms) and too large (> 20ms) dt's */
|
||||
if (dt < 0.0002f) {
|
||||
dt = 0.0002f;
|
||||
|
||||
} else if (dt > 0.02f) {
|
||||
dt = 0.02f;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user