Copter: make terrain-height-stable-when-no-position value stick

The set immediately above this return is completely ineffective without
a return statement.
This commit is contained in:
Peter Barker 2021-05-26 10:57:19 +10:00 committed by Randy Mackay
parent 4335951c42
commit 214bc4c282
1 changed files with 1 additions and 0 deletions

View File

@ -76,6 +76,7 @@ void Copter::update_ekf_terrain_height_stable()
// set to false if no position estimate
if (!position_ok() && !ekf_has_relative_position()) {
ahrs.set_terrain_hgt_stable(false);
return;
}
// consider terrain height stable if vehicle is taking off or landing