mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-07 16:38:30 -04:00
AP_Vehicle: correct compilation with HAL_INS_ACCELCAL_ENABLED false
This commit is contained in:
parent
38a1c4412a
commit
fe863b9567
@ -302,7 +302,9 @@ const AP_Scheduler::Task AP_Vehicle::scheduler_tasks[] = {
|
|||||||
#if OSD_ENABLED
|
#if OSD_ENABLED
|
||||||
SCHED_TASK(publish_osd_info, 1, 10, 240),
|
SCHED_TASK(publish_osd_info, 1, 10, 240),
|
||||||
#endif
|
#endif
|
||||||
|
#if HAL_INS_ACCELCAL_ENABLED
|
||||||
SCHED_TASK(accel_cal_update, 10, 100, 245),
|
SCHED_TASK(accel_cal_update, 10, 100, 245),
|
||||||
|
#endif
|
||||||
#if HAL_EFI_ENABLED
|
#if HAL_EFI_ENABLED
|
||||||
SCHED_TASK_CLASS(AP_EFI, &vehicle.efi, update, 10, 200, 250),
|
SCHED_TASK_CLASS(AP_EFI, &vehicle.efi, update, 10, 200, 250),
|
||||||
#endif
|
#endif
|
||||||
@ -482,6 +484,8 @@ void AP_Vehicle::get_osd_roll_pitch_rad(float &roll, float &pitch) const
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if HAL_INS_ACCELCAL_ENABLED
|
||||||
|
|
||||||
#ifndef HAL_CAL_ALWAYS_REBOOT
|
#ifndef HAL_CAL_ALWAYS_REBOOT
|
||||||
// allow for forced reboot after accelcal
|
// allow for forced reboot after accelcal
|
||||||
#define HAL_CAL_ALWAYS_REBOOT 0
|
#define HAL_CAL_ALWAYS_REBOOT 0
|
||||||
@ -492,7 +496,6 @@ void AP_Vehicle::get_osd_roll_pitch_rad(float &roll, float &pitch) const
|
|||||||
*/
|
*/
|
||||||
void AP_Vehicle::accel_cal_update()
|
void AP_Vehicle::accel_cal_update()
|
||||||
{
|
{
|
||||||
#if HAL_INS_ENABLED
|
|
||||||
if (hal.util->get_soft_armed()) {
|
if (hal.util->get_soft_armed()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -510,8 +513,8 @@ void AP_Vehicle::accel_cal_update()
|
|||||||
hal.scheduler->reboot(false);
|
hal.scheduler->reboot(false);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif // HAL_INS_ENABLED
|
|
||||||
}
|
}
|
||||||
|
#endif // HAL_INS_ACCELCAL_ENABLED
|
||||||
|
|
||||||
AP_Vehicle *AP_Vehicle::_singleton = nullptr;
|
AP_Vehicle *AP_Vehicle::_singleton = nullptr;
|
||||||
|
|
||||||
|
@ -386,8 +386,10 @@ protected:
|
|||||||
void publish_osd_info();
|
void publish_osd_info();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if HAL_INS_ACCELCAL_ENABLED
|
||||||
// update accel calibration
|
// update accel calibration
|
||||||
void accel_cal_update();
|
void accel_cal_update();
|
||||||
|
#endif
|
||||||
|
|
||||||
ModeReason control_mode_reason = ModeReason::UNKNOWN;
|
ModeReason control_mode_reason = ModeReason::UNKNOWN;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user