Merge pull request #301 from PX4/pr-fix_hagl_valid

return hagl valid false if update was rejected
This commit is contained in:
ChristophTobler
2017-07-13 17:28:53 +02:00
committed by GitHub
+2 -1
View File
@@ -145,6 +145,7 @@ void Ekf::fuseHagl()
}
} else {
_innov_check_fail_status.flags.reject_hagl = true;
return;
}
}
@@ -155,7 +156,7 @@ bool Ekf::get_terrain_vert_pos(float *ret)
{
memcpy(ret, &_terrain_vpos, sizeof(float));
if (_terrain_initialised && _range_data_continuous) {
if (_terrain_initialised && _range_data_continuous && !_innov_check_fail_status.flags.reject_hagl) {
return true;
} else {