diff --git a/libraries/AP_AHRS/AP_AHRS_NavEKF.cpp b/libraries/AP_AHRS/AP_AHRS_NavEKF.cpp index ea1fce25f3..307304d877 100644 --- a/libraries/AP_AHRS/AP_AHRS_NavEKF.cpp +++ b/libraries/AP_AHRS/AP_AHRS_NavEKF.cpp @@ -106,8 +106,10 @@ void AP_AHRS_NavEKF::update(bool skip_ins_update) update_EKF2(); } +#if AP_MODULE_SUPPORTED // call AHRS_update hook if any AP_Module::call_hook_AHRS_update(*this); +#endif // push gyros if optical flow present if (hal.opticalflow) {