From e57d936d8b285a3dfb803347f3665f1a2021055a Mon Sep 17 00:00:00 2001 From: Julian Oes Date: Wed, 10 Feb 2016 17:10:13 +0100 Subject: [PATCH] attitude_estimator_q: be specific about the error --- .../attitude_estimator_q/attitude_estimator_q_main.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/modules/attitude_estimator_q/attitude_estimator_q_main.cpp b/src/modules/attitude_estimator_q/attitude_estimator_q_main.cpp index fb0dce7ca5..100981dedc 100644 --- a/src/modules/attitude_estimator_q/attitude_estimator_q_main.cpp +++ b/src/modules/attitude_estimator_q/attitude_estimator_q_main.cpp @@ -391,8 +391,12 @@ void AttitudeEstimatorQ::task_main() _accel.set(_voter_accel.get_best(curr_time, &best_accel)); _mag.set(_voter_mag.get_best(curr_time, &best_mag)); - if (_accel.length() < 0.01f || _mag.length() < 0.01f) { - warnx("WARNING: degenerate accel / mag!"); + if (_accel.length() < 0.01f) { + warnx("WARNING: degenerate accel!"); + continue; + } + if (_mag.length() < 0.01f) { + warnx("WARNING: degenerate mag!"); continue; }