2022-10-04 21:22:17 -03:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <AP_HAL/AP_HAL_Boards.h>
|
2022-10-26 06:21:36 -03:00
|
|
|
#include <AP_ExternalAHRS/AP_ExternalAHRS_config.h>
|
|
|
|
#include <AP_MSP/msp.h>
|
2022-10-04 21:22:17 -03:00
|
|
|
|
|
|
|
#ifndef AP_COMPASS_DIAGONALS_ENABLED
|
2022-10-26 04:14:11 -03:00
|
|
|
#define AP_COMPASS_DIAGONALS_ENABLED 1
|
2022-10-04 21:22:17 -03:00
|
|
|
#endif
|
2022-10-26 06:21:36 -03:00
|
|
|
|
|
|
|
// Backend support
|
2023-01-04 18:47:39 -04:00
|
|
|
#ifndef AP_COMPASS_BACKEND_DEFAULT_ENABLED
|
|
|
|
#define AP_COMPASS_BACKEND_DEFAULT_ENABLED 1
|
|
|
|
#endif
|
|
|
|
|
2022-10-26 06:21:36 -03:00
|
|
|
#ifndef AP_COMPASS_EXTERNALAHRS_ENABLED
|
2023-01-04 18:47:39 -04:00
|
|
|
#define AP_COMPASS_EXTERNALAHRS_ENABLED (AP_COMPASS_BACKEND_DEFAULT_ENABLED && HAL_EXTERNAL_AHRS_ENABLED)
|
2022-10-26 06:21:36 -03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef AP_COMPASS_MSP_ENABLED
|
2023-01-04 18:47:39 -04:00
|
|
|
#define AP_COMPASS_MSP_ENABLED (AP_COMPASS_BACKEND_DEFAULT_ENABLED && HAL_MSP_SENSORS_ENABLED)
|
2022-10-26 06:21:36 -03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef AP_COMPASS_SITL_ENABLED
|
2023-01-04 18:47:39 -04:00
|
|
|
#define AP_COMPASS_SITL_ENABLED (AP_COMPASS_BACKEND_DEFAULT_ENABLED && AP_SIM_ENABLED)
|
2022-10-26 06:21:36 -03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef AP_COMPASS_UAVCAN_ENABLED
|
2023-01-04 18:47:39 -04:00
|
|
|
#define AP_COMPASS_UAVCAN_ENABLED (AP_COMPASS_BACKEND_DEFAULT_ENABLED && HAL_ENABLE_LIBUAVCAN_DRIVERS)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// i2c-based compasses:
|
|
|
|
#ifndef AP_COMPASS_I2C_BACKEND_DEFAULT_ENABLED
|
|
|
|
#define AP_COMPASS_I2C_BACKEND_DEFAULT_ENABLED AP_COMPASS_BACKEND_DEFAULT_ENABLED
|
|
|
|
#endif
|
|
|
|
|
2023-02-01 08:53:43 -04:00
|
|
|
#ifndef AP_COMPASS_AK8963_ENABLED
|
|
|
|
#define AP_COMPASS_AK8963_ENABLED AP_COMPASS_I2C_BACKEND_DEFAULT_ENABLED
|
|
|
|
#endif
|
|
|
|
|
2023-01-29 19:33:08 -04:00
|
|
|
#ifndef AP_COMPASS_HMC5843_ENABLED
|
|
|
|
#define AP_COMPASS_HMC5843_ENABLED AP_COMPASS_I2C_BACKEND_DEFAULT_ENABLED
|
|
|
|
#endif
|
|
|
|
|
2023-01-04 18:47:39 -04:00
|
|
|
#ifndef AP_COMPASS_IST8308_ENABLED
|
|
|
|
#define AP_COMPASS_IST8308_ENABLED AP_COMPASS_I2C_BACKEND_DEFAULT_ENABLED
|
2022-10-26 06:21:36 -03:00
|
|
|
#endif
|
2023-01-27 00:09:50 -04:00
|
|
|
|
|
|
|
#ifndef AP_COMPASS_LSM303D_ENABLED
|
|
|
|
#define AP_COMPASS_LSM303D_ENABLED AP_COMPASS_I2C_BACKEND_DEFAULT_ENABLED
|
|
|
|
#endif
|