Merge pull request #184 from PX4/pr-rngDelayFix

fixed computation of range measurement timestamp
This commit is contained in:
Paul Riseborough 2016-10-04 09:13:19 +11:00 committed by GitHub
commit 5ab90048e1
1 changed files with 1 additions and 3 deletions

View File

@ -241,9 +241,7 @@ void EstimatorInterface::setRangeData(uint64_t time_usec, float *data)
rangeSample range_sample_new = {}; rangeSample range_sample_new = {};
range_sample_new.rng = *data; range_sample_new.rng = *data;
rng = *data; rng = *data;
range_sample_new.time_us -= _params.range_delay_ms * 1000; range_sample_new.time_us = time_usec - _params.range_delay_ms * 1000;
range_sample_new.time_us = time_usec;
_time_last_range = time_usec; _time_last_range = time_usec;
_range_buffer.push(range_sample_new); _range_buffer.push(range_sample_new);