diff --git a/libraries/AP_Vehicle/AP_Vehicle.cpp b/libraries/AP_Vehicle/AP_Vehicle.cpp index 324763a4b3..284b477c98 100644 --- a/libraries/AP_Vehicle/AP_Vehicle.cpp +++ b/libraries/AP_Vehicle/AP_Vehicle.cpp @@ -304,6 +304,7 @@ const AP_Scheduler::Task AP_Vehicle::scheduler_tasks[] = { #if HAL_EFI_ENABLED SCHED_TASK_CLASS(AP_EFI, &vehicle.efi, update, 10, 200, 250), #endif + SCHED_TASK(update_arming, 1, 50, 253), }; void AP_Vehicle::get_common_scheduler_tasks(const AP_Scheduler::Task*& tasks, uint8_t& num_tasks) @@ -592,6 +593,12 @@ void AP_Vehicle::accel_cal_update() } #endif // HAL_INS_ACCELCAL_ENABLED +// call the arming library's update function +void AP_Vehicle::update_arming() +{ + AP::arming().update(); +} + AP_Vehicle *AP_Vehicle::_singleton = nullptr; AP_Vehicle *AP_Vehicle::get_singleton() diff --git a/libraries/AP_Vehicle/AP_Vehicle.h b/libraries/AP_Vehicle/AP_Vehicle.h index 3102f79535..e5e144c327 100644 --- a/libraries/AP_Vehicle/AP_Vehicle.h +++ b/libraries/AP_Vehicle/AP_Vehicle.h @@ -393,6 +393,9 @@ protected: void accel_cal_update(); #endif + // call the arming library's update function + void update_arming(); + ModeReason control_mode_reason = ModeReason::UNKNOWN; #if AP_SIM_ENABLED