mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-22 00:28:30 -04:00
AP_AHRS: fixed a bug with startup ordering of SITL
this fixes a crash that can happen with SITL
This commit is contained in:
parent
a5b7de2577
commit
7a6ab4ac44
@ -85,6 +85,11 @@ void AP_AHRS_NavEKF::update(bool skip_ins_update)
|
||||
if (_ekf_type == 1) {
|
||||
_ekf_type.set(2);
|
||||
}
|
||||
|
||||
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL
|
||||
update_SITL();
|
||||
#endif
|
||||
|
||||
update_DCM(skip_ins_update);
|
||||
if (_ekf_type == 2) {
|
||||
// if EK2 is primary then run EKF2 first to give it CPU
|
||||
@ -96,9 +101,6 @@ void AP_AHRS_NavEKF::update(bool skip_ins_update)
|
||||
update_EKF3();
|
||||
update_EKF2();
|
||||
}
|
||||
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL
|
||||
update_SITL();
|
||||
#endif
|
||||
|
||||
// call AHRS_update hook if any
|
||||
AP_Module::call_hook_AHRS_update(*this);
|
||||
|
Loading…
Reference in New Issue
Block a user