mirror of
https://github.com/ArduPilot/ardupilot.git
synced 2026-10-02 10:23:25 +08:00
ArduSub: remove EKF compass offset saving from disarm
This is now done for all vehicles by AP_Arming::disarm(). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
committed by
Peter Barker
co-authored by
Claude Opus 5
parent
11b11b8ca9
commit
15f98e6cdb
@@ -179,18 +179,6 @@ bool AP_Arming_Sub::disarm(const AP_Arming::Method method, bool do_disarm_checks
|
||||
|
||||
send_arm_disarm_statustext("Disarming motors");
|
||||
|
||||
auto &ahrs = AP::ahrs();
|
||||
|
||||
// save compass offsets learned by the EKF if enabled
|
||||
if (ahrs.use_compass() && AP::compass().get_learn_type() == Compass::LearnType::COPY_FROM_EKF) {
|
||||
for (uint8_t i=0; i<COMPASS_MAX_INSTANCES; i++) {
|
||||
Vector3f magOffsets;
|
||||
if (ahrs.getMagOffsets(i, magOffsets)) {
|
||||
AP::compass().set_and_save_offsets(i, magOffsets);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// send disarm command to motors
|
||||
sub.motors.armed(false);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user