diff --git a/libraries/AP_VisualOdom/AP_VisualOdom.cpp b/libraries/AP_VisualOdom/AP_VisualOdom.cpp index a70d9fa166..2bc4240ae4 100644 --- a/libraries/AP_VisualOdom/AP_VisualOdom.cpp +++ b/libraries/AP_VisualOdom/AP_VisualOdom.cpp @@ -258,18 +258,18 @@ bool AP_VisualOdom::pre_arm_check(char *failure_msg, uint8_t failure_msg_len) co return true; } - // check healthy - if (!healthy()) { - hal.util->snprintf(failure_msg, failure_msg_len, "not healthy"); - return false; - } - // if no backend we must have failed to create because out of memory if (_driver == nullptr) { hal.util->snprintf(failure_msg, failure_msg_len, "out of memory"); return false; } + // check healthy + if (!healthy()) { + hal.util->snprintf(failure_msg, failure_msg_len, "not healthy"); + return false; + } + // call backend specific arming check return _driver->pre_arm_check(failure_msg, failure_msg_len); }