mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-14 16:20:34 +08:00
ekf2: Make stuck detector optional
This commit is contained in:
committed by
Mathieu Bresciani
parent
3d16383bb4
commit
94d4dc85f8
@@ -114,6 +114,12 @@ inline bool SensorRangeFinder::isDataInRange() const
|
||||
|
||||
void SensorRangeFinder::updateStuckCheck()
|
||||
{
|
||||
if(!isStuckDetectorEnabled()){
|
||||
// Stuck detector disabled
|
||||
_is_stuck = false;
|
||||
return;
|
||||
}
|
||||
|
||||
// Check for "stuck" range finder measurements when range was not valid for certain period
|
||||
// This handles a failure mode observed with some lidar sensors
|
||||
if (((_sample.time_us - _time_last_valid_us) > (uint64_t)10e6)) {
|
||||
|
||||
Reference in New Issue
Block a user