Skip to content

Commit a8b57dc

Browse files
committed
AP_AHRS: add arming check that the AHRS_EKF_TYPE canonicalisation is no-op
1 parent 4b1dd99 commit a8b57dc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

libraries/AP_AHRS/AP_AHRS.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2335,7 +2335,8 @@ bool AP_AHRS::pre_arm_check(bool requires_position, char *failure_msg, uint8_t f
23352335
}
23362336

23372337
// ensure we're using the configured backend, but bypass in compass-less cases:
2338-
if (configured_ekf_type() != active_EKF_type() && AP::compass().use_for_yaw()) {
2338+
if (_ekf_type != int8_t(configured_ekf_type()) ||
2339+
(configured_ekf_type() != active_EKF_type() && AP::compass().use_for_yaw())) {
23392340
hal.util->snprintf(failure_msg, failure_msg_len, "not using configured AHRS type");
23402341
return false;
23412342
}

0 commit comments

Comments
 (0)