mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-28 15:03:33 +08:00
EKF add clarity brackets to avoid potential confusion
- fixes https://github.com/PX4/ecl/issues/555
This commit is contained in:
@@ -149,7 +149,7 @@ void Ekf::fuseHagl()
|
||||
_innov_check_fail_status.flags.reject_hagl = false;
|
||||
} else {
|
||||
// If we have been rejecting range data for too long, reset to measurement
|
||||
if (_time_last_imu - _time_last_hagl_fuse > (uint64_t)10E6) {
|
||||
if ((_time_last_imu - _time_last_hagl_fuse) > (uint64_t)10E6) {
|
||||
_terrain_vpos = _state.pos(2) + meas_hagl;
|
||||
_terrain_var = obs_variance;
|
||||
} else {
|
||||
@@ -171,7 +171,7 @@ bool Ekf::get_terrain_valid()
|
||||
// determine terrain validity
|
||||
void Ekf::update_terrain_valid()
|
||||
{
|
||||
if (_terrain_initialised && (_time_last_imu - _time_last_hagl_fuse < (uint64_t)5e6)) {
|
||||
if (_terrain_initialised && ((_time_last_imu - _time_last_hagl_fuse) < (uint64_t)5e6)) {
|
||||
|
||||
_hagl_valid = true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user