Skip to content

Commit

Permalink
fix test.Plane.DCMFallback
Browse files Browse the repository at this point in the history
  • Loading branch information
shellixyz committed Oct 24, 2023
1 parent fde226b commit 20507a3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libraries/AP_AHRS/AP_AHRS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,13 @@
#define ATTITUDE_CHECK_THRESH_ROLL_PITCH_RAD radians(10)
#define ATTITUDE_CHECK_THRESH_YAW_RAD radians(20)

#if CONFIG_HAL_BOARD == HAL_BOARD_SITL
#define HAL_AHRS_EKF_TYPE_DEFAULT 3
#else
#ifndef HAL_AHRS_EKF_TYPE_DEFAULT
#define HAL_AHRS_EKF_TYPE_DEFAULT 2
#endif
#endif

// table of user settable parameters
const AP_Param::GroupInfo AP_AHRS::var_info[] = {
Expand Down
6 changes: 6 additions & 0 deletions libraries/AP_AHRS/AP_AHRS.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@
#include <AP_HAL/AP_HAL_Boards.h>
#include <AP_HAL/Semaphores.h>

#if CONFIG_HAL_BOARD == HAL_BOARD_SITL
#define HAL_NAVEKF2_AVAILABLE 1
#define HAL_NAVEKF3_AVAILABLE 1
#else

#ifndef HAL_NAVEKF3_AVAILABLE
// only default to EK2 enabled on boards with over 1M flash
#define HAL_NAVEKF3_AVAILABLE (BOARD_FLASH_SIZE>1024)
Expand All @@ -32,6 +37,7 @@
#ifndef HAL_NAVEKF2_AVAILABLE
#define HAL_NAVEKF2_AVAILABLE 1
#endif
#endif

#ifndef AP_AHRS_SIM_ENABLED
#define AP_AHRS_SIM_ENABLED AP_SIM_ENABLED
Expand Down

0 comments on commit 20507a3

Please sign in to comment.