From f86ef3478219b4b1c31e17b8f308df4b69eda2f7 Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Tue, 5 Apr 2016 19:05:22 -0700 Subject: [PATCH] EKF: Fix error message which lied --- EKF/control.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/EKF/control.cpp b/EKF/control.cpp index 8fc114a045..f3287adc5d 100644 --- a/EKF/control.cpp +++ b/EKF/control.cpp @@ -184,7 +184,9 @@ void Ekf::controlFusionModes() _control_status.flags.rng_hgt = false; // adjust the height offset so we can use the GPS _hgt_sensor_offset = _state.pos(2) + gps_init.hgt - _gps_alt_ref; - printf("EKF baro hgt timeout - switching to gps\n"); + if (!baro_hgt_available) { + printf("EKF baro hgt timeout - switching to gps\n"); + } } }