mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-22 09:28:58 +00:00
commander: prevent ekf checking being bypassed if GPS checking is disabled
This commit is contained in:
committed by
Lorenz Meier
parent
ddfe077f7c
commit
c09eecbab1
@@ -789,9 +789,9 @@ bool preflightCheck(orb_advert_t *mavlink_log_pub, bool checkSensors, bool check
|
||||
// only check EKF2 data if EKF2 is selected as the estimator and GNSS checking is enabled
|
||||
int32_t estimator_type;
|
||||
param_get(param_find("SYS_MC_EST_GROUP"), &estimator_type);
|
||||
if (estimator_type == 2 && checkGNSS) {
|
||||
if (estimator_type == 2) {
|
||||
// don't fail if not using GPS for the first 20s after gaining 3D lock because quality checks take time to pass
|
||||
bool enforce_gps_required = (_time_last_no_gps_lock > 20 * 1000000);
|
||||
bool enforce_gps_required = (_time_last_no_gps_lock > 20 * 1000000) && checkGNSS;
|
||||
|
||||
if (!ekf2Check(mavlink_log_pub, true, reportFailures, enforce_gps_required)) {
|
||||
failed = true;
|
||||
|
||||
Reference in New Issue
Block a user