mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
Q attitude estimator: Prevent division by zero
This commit is contained in:
parent
b61e95adfd
commit
c4f9318e75
@ -398,7 +398,7 @@ void AttitudeEstimatorQ::task_main()
|
||||
|
||||
// Time from previous iteration
|
||||
hrt_abstime now = hrt_absolute_time();
|
||||
float dt = (last_time > 0) ? ((now - last_time) / 1000000.0f) : 0.0f;
|
||||
float dt = (last_time > 0) ? ((now - last_time) / 1000000.0f) : 0.00001f;
|
||||
last_time = now;
|
||||
|
||||
if (dt > _dt_max) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user