mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-23 02:33:34 +08:00
ekf2: Make stuck detector optional
This commit is contained in:
committed by
Mathieu Bresciani
parent
3d16383bb4
commit
94d4dc85f8
@@ -240,8 +240,16 @@ TEST_F(SensorRangeFinderTest, rangeStuck)
|
||||
|
||||
// THEN: the data should be marked as unhealthy
|
||||
// because the sensor is "stuck"
|
||||
EXPECT_FALSE(_range_finder.isDataHealthy());
|
||||
EXPECT_FALSE(_range_finder.isHealthy());
|
||||
if (_range_finder.isStuckDetectorEnabled()) {
|
||||
EXPECT_FALSE(_range_finder.isDataHealthy());
|
||||
EXPECT_FALSE(_range_finder.isHealthy());
|
||||
|
||||
} else {
|
||||
// If stuck detector is disabled then the
|
||||
// data should instantly be marked as healthy
|
||||
EXPECT_TRUE(_range_finder.isDataHealthy());
|
||||
EXPECT_TRUE(_range_finder.isHealthy());
|
||||
}
|
||||
|
||||
// BUT WHEN: we continue to send samples but with changing distance
|
||||
for (int i = 0; i < 2; i++) {
|
||||
|
||||
Reference in New Issue
Block a user