Skip to content
Snippets Groups Projects
Commit fc997dd0 authored by Beat Küng's avatar Beat Küng Committed by Daniel Agar
Browse files

mc_att_control: reduce minimum required dt

2ms is not enough to run at 1kHz
parent d552c2a3
No related branches found
No related tags found
No related merge requests found
...@@ -703,9 +703,9 @@ MulticopterAttitudeControl::run() ...@@ -703,9 +703,9 @@ MulticopterAttitudeControl::run()
float dt = (now - last_run) / 1e6f; float dt = (now - last_run) / 1e6f;
last_run = now; last_run = now;
/* guard against too small (< 2ms) and too large (> 20ms) dt's */ /* guard against too small (< 0.2ms) and too large (> 20ms) dt's */
if (dt < 0.002f) { if (dt < 0.0002f) {
dt = 0.002f; dt = 0.0002f;
} else if (dt > 0.02f) { } else if (dt > 0.02f) {
dt = 0.02f; dt = 0.02f;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment