mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-21 21:55:34 +08:00
lpe: use minimum flow altitude from uORB instead of hardcoding
This commit is contained in:
committed by
Lorenz Meier
parent
07e6730cd7
commit
7ec6f0dca6
@@ -10,9 +10,6 @@ extern orb_advert_t mavlink_log_pub;
|
||||
static const uint32_t REQ_FLOW_INIT_COUNT = 10;
|
||||
static const uint32_t FLOW_TIMEOUT = 1000000; // 1 s
|
||||
|
||||
// minimum flow altitude
|
||||
static const float flow_min_agl = 0.3;
|
||||
|
||||
void BlockLocalPositionEstimator::flowInit()
|
||||
{
|
||||
// measure
|
||||
@@ -44,7 +41,7 @@ int BlockLocalPositionEstimator::flowMeasure(Vector<float, n_y_flow> &y)
|
||||
}
|
||||
|
||||
// check for agl
|
||||
if (agl() < flow_min_agl) {
|
||||
if (agl() < _sub_flow.get().min_ground_distance) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user