mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-02 00:34:07 +08:00
Ekf control: do not set hgt mode if already set
If we are in a certain height mode and that we do a reset to the same mode, there is no need to set the mode again.
This commit is contained in:
parent
13a7d53295
commit
d09473da89
@ -811,8 +811,6 @@ void Ekf::controlHeightSensorTimeouts()
|
||||
ECL_WARN_TIMESTAMPED("baro hgt timeout - reset to GPS");
|
||||
|
||||
} else if (!_baro_hgt_faulty) {
|
||||
setControlBaroHeight();
|
||||
|
||||
request_height_reset = true;
|
||||
ECL_WARN_TIMESTAMPED("baro hgt timeout - reset to baro");
|
||||
}
|
||||
@ -839,8 +837,6 @@ void Ekf::controlHeightSensorTimeouts()
|
||||
ECL_WARN_TIMESTAMPED("gps hgt timeout - reset to baro");
|
||||
|
||||
} else if (!_gps_hgt_intermittent) {
|
||||
setControlGPSHeight();
|
||||
|
||||
request_height_reset = true;
|
||||
ECL_WARN_TIMESTAMPED("gps hgt timeout - reset to GPS");
|
||||
}
|
||||
@ -848,8 +844,6 @@ void Ekf::controlHeightSensorTimeouts()
|
||||
} else if (_control_status.flags.rng_hgt) {
|
||||
|
||||
if (_rng_hgt_valid) {
|
||||
setControlRangeHeight();
|
||||
|
||||
request_height_reset = true;
|
||||
ECL_WARN_TIMESTAMPED("rng hgt timeout - reset to rng hgt");
|
||||
|
||||
@ -866,8 +860,6 @@ void Ekf::controlHeightSensorTimeouts()
|
||||
const bool ev_data_available = isRecent(ev_init.time_us, 2 * EV_MAX_INTERVAL);
|
||||
|
||||
if (ev_data_available) {
|
||||
setControlEVHeight();
|
||||
|
||||
request_height_reset = true;
|
||||
ECL_WARN_TIMESTAMPED("ev hgt timeout - reset to ev hgt");
|
||||
|
||||
@ -884,7 +876,6 @@ void Ekf::controlHeightSensorTimeouts()
|
||||
resetHeight();
|
||||
// Reset the timout timer
|
||||
_time_last_hgt_fuse = _time_last_imu;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user