AP_HAL: allow for double EKF build

This commit is contained in:
Andrew Tridgell 2021-05-04 21:12:23 +10:00
parent 6171006579
commit 309500c84f
4 changed files with 20 additions and 1 deletions

View File

@ -6,7 +6,7 @@
macros to allow code to build on multiple platforms more easily
*/
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL || CONFIG_HAL_BOARD == HAL_BOARD_LINUX
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL || CONFIG_HAL_BOARD == HAL_BOARD_LINUX || HAL_WITH_EKF_DOUBLE
/*
allow double maths on Linux and SITL to avoid problems with system headers
*/

View File

@ -56,6 +56,10 @@
#define HAL_WITH_RAMTRON 0
#endif
#ifndef HAL_WITH_EKF_DOUBLE
#define HAL_WITH_EKF_DOUBLE HAL_HAVE_HARDWARE_DOUBLE
#endif
// allow for static semaphores
#include <AP_HAL_ChibiOS/Semaphores.h>
#define HAL_Semaphore ChibiOS::Semaphore

View File

@ -355,3 +355,11 @@
#define HAL_Semaphore Linux::Semaphore
#include <AP_HAL/EventHandle.h>
#define HAL_EventHandle AP_HAL::EventHandle
#ifndef HAL_HAVE_HARDWARE_DOUBLE
#define HAL_HAVE_HARDWARE_DOUBLE 1
#endif
#ifndef HAL_WITH_EKF_DOUBLE
#define HAL_WITH_EKF_DOUBLE HAL_HAVE_HARDWARE_DOUBLE
#endif

View File

@ -71,3 +71,10 @@
#define HAL_BOARD_STORAGE_DIRECTORY "."
#endif
#ifndef HAL_HAVE_HARDWARE_DOUBLE
#define HAL_HAVE_HARDWARE_DOUBLE 1
#endif
#ifndef HAL_WITH_EKF_DOUBLE
#define HAL_WITH_EKF_DOUBLE HAL_HAVE_HARDWARE_DOUBLE
#endif