EKF : Fix type of flow data navigation variable (#499)

This commit is contained in:
Kabir Mohammed 2018-08-30 04:26:17 -04:00 committed by Paul Riseborough
parent a53ad9c261
commit a6a1edbe3f

View File

@ -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