From 721f5e61a5965a08a34b2875d2bdc0b5d3b80601 Mon Sep 17 00:00:00 2001 From: Anna Dai Date: Tue, 18 Dec 2018 14:26:38 +0100 Subject: [PATCH] increase optical flow buffer to imu buffer length --- EKF/estimator_interface.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/EKF/estimator_interface.cpp b/EKF/estimator_interface.cpp index 0c81def790..0dc1f0b18c 100644 --- a/EKF/estimator_interface.cpp +++ b/EKF/estimator_interface.cpp @@ -351,8 +351,8 @@ void EstimatorInterface::setOpticalFlowData(uint64_t time_usec, flow_message *fl // Allocate the required buffer size if not previously done // Do not retry if allocation has failed previously - if (_flow_buffer.get_length() < _obs_buffer_length) { - _flow_buffer_fail = !_flow_buffer.allocate(_obs_buffer_length); + if (_flow_buffer.get_length() < _imu_buffer_length) { + _flow_buffer_fail = !_flow_buffer.allocate(_imu_buffer_length); if (_flow_buffer_fail) { ECL_ERR("EKF optical flow buffer allocation failed");