lpe: use minimum flow altitude from uORB instead of hardcoding

This commit is contained in:
Oleg Kalachev 2019-05-05 06:22:30 +03:00 committed by Lorenz Meier
parent 07e6730cd7
commit 7ec6f0dca6
1 changed files with 1 additions and 4 deletions

View File

@ -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;
}