Q attitude estimator: Prevent division by zero

This commit is contained in:
Lorenz Meier 2015-10-18 15:49:01 +02:00
parent b61e95adfd
commit c4f9318e75

View File

@ -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) {