From a6a1edbe3ff8fbe3ce26928665d4f16e754258a3 Mon Sep 17 00:00:00 2001 From: Kabir Mohammed Date: Thu, 30 Aug 2018 04:26:17 -0400 Subject: [PATCH] EKF : Fix type of flow data navigation variable (#499) --- EKF/estimator_interface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EKF/estimator_interface.cpp b/EKF/estimator_interface.cpp index 49eec92414..bf2ce20217 100644 --- a/EKF/estimator_interface.cpp +++ b/EKF/estimator_interface.cpp @@ -378,7 +378,7 @@ void EstimatorInterface::setOpticalFlowData(uint64_t time_usec, flow_message *fl // Check data validity and write to buffers // Use a zero velocity assumption to constrain drift when on-ground if necessary - float use_flow_data_to_navigate = delta_time_good && flow_quality_good && (flow_magnitude_good || relying_on_flow); + bool use_flow_data_to_navigate = delta_time_good && flow_quality_good && (flow_magnitude_good || relying_on_flow); if (use_flow_data_to_navigate || (!_control_status.flags.in_air && relying_on_flow)) { flowSample optflow_sample_new; // calculate the system time-stamp for the trailing edge of the flow data integration period