From ce182fd30766df661beb20f18a59278b9eff5b0c Mon Sep 17 00:00:00 2001 From: Ebin Date: Fri, 6 Jul 2018 12:17:24 +0530 Subject: [PATCH] APM_Control: fixed test condition in AR_AttutudeControl.cpp --- libraries/APM_Control/AR_AttitudeControl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/APM_Control/AR_AttitudeControl.cpp b/libraries/APM_Control/AR_AttitudeControl.cpp index 4f456aba4c..4de6c06071 100644 --- a/libraries/APM_Control/AR_AttitudeControl.cpp +++ b/libraries/APM_Control/AR_AttitudeControl.cpp @@ -503,7 +503,7 @@ float AR_AttitudeControl::get_throttle_out_from_pitch(float desired_pitch, bool const uint32_t now = AP_HAL::millis(); // if not called recently, reset input filter - if ((_balance_last_ms == 0) || ((now - _balance_last_ms) > (AR_ATTCONTROL_TIMEOUT_MS / 1000.0f))) { + if ((_balance_last_ms == 0) || ((now - _balance_last_ms) > (AR_ATTCONTROL_TIMEOUT_MS))) { _pitch_to_throttle_pid.reset_filter(); } else { _pitch_to_throttle_pid.set_dt(dt);