mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
range_finder_consistency_check: fix consistency check timeout units (#26497)
* range_finder_consistency_check: fix consistency check timeout units * explicit float * format
This commit is contained in:
parent
d5ddc9135d
commit
b2fc5993cc
@ -75,7 +75,9 @@ void RangeFinderConsistencyCheck::update(float dist_bottom, float dist_bottom_va
|
||||
void RangeFinderConsistencyCheck::updateConsistency(float vz, uint64_t time_us)
|
||||
{
|
||||
if (fabsf(_signed_test_ratio_lpf.getState()) >= 1.f) {
|
||||
if ((time_us - _time_last_horizontal_motion) > _signed_test_ratio_tau) {
|
||||
uint64_t timeout_us = _signed_test_ratio_tau * 1e6f;
|
||||
|
||||
if ((time_us - _time_last_horizontal_motion) > timeout_us) {
|
||||
_is_kinematically_consistent = false;
|
||||
_time_last_inconsistent_us = time_us;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user