Browse Source

AP_Vehicle: run prearm checks on all vehicles @1Hz, displaying @0.0333Hz

apm_2208
Peter Barker 3 years ago committed by Randy Mackay
parent
commit
8402149572
  1. 7
      libraries/AP_Vehicle/AP_Vehicle.cpp
  2. 3
      libraries/AP_Vehicle/AP_Vehicle.h

7
libraries/AP_Vehicle/AP_Vehicle.cpp

@ -304,6 +304,7 @@ const AP_Scheduler::Task AP_Vehicle::scheduler_tasks[] = { @@ -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() @@ -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()

3
libraries/AP_Vehicle/AP_Vehicle.h

@ -393,6 +393,9 @@ protected: @@ -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

Loading…
Cancel
Save