File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -566,7 +566,7 @@ bool AP_Arming_Copter::alt_checks(bool display_failure)
566566// has side-effect that logging is started
567567bool AP_Arming_Copter::arm_checks (AP_Arming::Method method)
568568{
569- const auto &ahrs = AP::ahrs ();
569+ auto &ahrs = AP::ahrs ();
570570
571571 // always check if inertial nav has started and is ready
572572 if (!ahrs.healthy ()) {
@@ -645,6 +645,11 @@ bool AP_Arming_Copter::arm_checks(AP_Arming::Method method)
645645 return false ;
646646 }
647647
648+ if (!ahrs.set_origin_to_recorded ()) {
649+ check_failed (true , " No origin set" );
650+ return false ;
651+ }
652+
648653 // superclass method should always be the last thing called; it
649654 // has side-effects which would need to be cleaned up if one of
650655 // our arm checks failed
You can’t perform that action at this time.
0 commit comments