Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Path: blob/master/libraries/AP_Compass/AP_Compass_config.h
Views: 1798
#pragma once12#include <AP_HAL/AP_HAL_Boards.h>3#include <AP_ExternalAHRS/AP_ExternalAHRS_config.h>4#include <AP_MSP/msp.h>5#include <AP_AHRS/AP_AHRS_config.h>6#include <AP_GPS/AP_GPS_config.h>78#ifndef AP_COMPASS_ENABLED9#define AP_COMPASS_ENABLED 110#endif1112#ifndef AP_COMPASS_DIAGONALS_ENABLED13#define AP_COMPASS_DIAGONALS_ENABLED 114#endif1516#ifndef COMPASS_CAL_ENABLED17#define COMPASS_CAL_ENABLED AP_COMPASS_ENABLED && AP_AHRS_DCM_ENABLED18#endif1920#ifndef AP_COMPASS_CALIBRATION_FIXED_YAW_ENABLED21#define AP_COMPASS_CALIBRATION_FIXED_YAW_ENABLED AP_COMPASS_ENABLED && AP_GPS_ENABLED && AP_AHRS_ENABLED22#endif2324#define COMPASS_MAX_SCALE_FACTOR 1.525#define COMPASS_MIN_SCALE_FACTOR (1.0/COMPASS_MAX_SCALE_FACTOR)2627// Backend support28#ifndef AP_COMPASS_BACKEND_DEFAULT_ENABLED29#define AP_COMPASS_BACKEND_DEFAULT_ENABLED AP_COMPASS_ENABLED30#endif3132#ifndef AP_COMPASS_EXTERNALAHRS_ENABLED33#define AP_COMPASS_EXTERNALAHRS_ENABLED (AP_COMPASS_BACKEND_DEFAULT_ENABLED && HAL_EXTERNAL_AHRS_ENABLED)34#endif3536#ifndef AP_COMPASS_MSP_ENABLED37#define AP_COMPASS_MSP_ENABLED (AP_COMPASS_BACKEND_DEFAULT_ENABLED && HAL_MSP_SENSORS_ENABLED)38#endif3940#ifndef AP_COMPASS_SITL_ENABLED41#define AP_COMPASS_SITL_ENABLED (AP_COMPASS_BACKEND_DEFAULT_ENABLED && AP_SIM_ENABLED)42#endif4344#ifndef AP_COMPASS_DRONECAN_ENABLED45#define AP_COMPASS_DRONECAN_ENABLED (AP_COMPASS_BACKEND_DEFAULT_ENABLED && HAL_ENABLE_DRONECAN_DRIVERS)46#endif4748#ifndef AP_COMPASS_DRONECAN_HIRES_ENABLED49#define AP_COMPASS_DRONECAN_HIRES_ENABLED 050#endif5152// i2c-based compasses:53#ifndef AP_COMPASS_I2C_BACKEND_DEFAULT_ENABLED54#define AP_COMPASS_I2C_BACKEND_DEFAULT_ENABLED AP_COMPASS_BACKEND_DEFAULT_ENABLED55#endif5657#ifndef AP_COMPASS_AK09916_ENABLED58#define AP_COMPASS_AK09916_ENABLED AP_COMPASS_I2C_BACKEND_DEFAULT_ENABLED59#endif6061#ifndef AP_COMPASS_AK8963_ENABLED62#define AP_COMPASS_AK8963_ENABLED AP_COMPASS_I2C_BACKEND_DEFAULT_ENABLED63#endif6465#ifndef AP_COMPASS_BMM150_ENABLED66#define AP_COMPASS_BMM150_ENABLED AP_COMPASS_I2C_BACKEND_DEFAULT_ENABLED67#endif6869// this define dictates whether we iterate over the external i2c70// busses looking for BMM150. Ordinarily this should be true, but71// SkyViper specifies its BMM150 and thus does not need to probe.72// This is an interim arrangement until PCNC1 is eliminated as an73// auto-detect board.74#ifndef AP_COMPASS_BMM150_DETECT_BACKENDS_ENABLED75#define AP_COMPASS_BMM150_DETECT_BACKENDS_ENABLED AP_COMPASS_BMM150_ENABLED76#endif7778#ifndef AP_COMPASS_BMM350_ENABLED79#define AP_COMPASS_BMM350_ENABLED AP_COMPASS_I2C_BACKEND_DEFAULT_ENABLED80#endif8182#ifndef AP_COMPASS_HMC5843_ENABLED83#define AP_COMPASS_HMC5843_ENABLED AP_COMPASS_I2C_BACKEND_DEFAULT_ENABLED84#endif8586#ifndef AP_COMPASS_ICM20948_ENABLED87#define AP_COMPASS_ICM20948_ENABLED AP_COMPASS_I2C_BACKEND_DEFAULT_ENABLED88#endif8990#ifndef AP_COMPASS_IIS2MDC_ENABLED91#define AP_COMPASS_IIS2MDC_ENABLED 092#endif9394#ifndef AP_COMPASS_IST8308_ENABLED95#define AP_COMPASS_IST8308_ENABLED AP_COMPASS_I2C_BACKEND_DEFAULT_ENABLED96#endif9798#ifndef AP_COMPASS_IST8310_ENABLED99#define AP_COMPASS_IST8310_ENABLED AP_COMPASS_I2C_BACKEND_DEFAULT_ENABLED100#endif101102#ifndef AP_COMPASS_LIS3MDL_ENABLED103#define AP_COMPASS_LIS3MDL_ENABLED AP_COMPASS_I2C_BACKEND_DEFAULT_ENABLED104#endif105106#ifndef AP_COMPASS_LSM303D_ENABLED107#define AP_COMPASS_LSM303D_ENABLED AP_COMPASS_I2C_BACKEND_DEFAULT_ENABLED108#endif109110#ifndef AP_COMPASS_LSM9DS1_ENABLED111#define AP_COMPASS_LSM9DS1_ENABLED AP_COMPASS_I2C_BACKEND_DEFAULT_ENABLED112#endif113114#ifndef AP_COMPASS_MAG3110_ENABLED115#define AP_COMPASS_MAG3110_ENABLED AP_COMPASS_I2C_BACKEND_DEFAULT_ENABLED116#endif117118#ifndef AP_COMPASS_MMC3416_ENABLED119#define AP_COMPASS_MMC3416_ENABLED AP_COMPASS_I2C_BACKEND_DEFAULT_ENABLED120#endif121122#ifndef AP_COMPASS_MMC5XX3_ENABLED123#define AP_COMPASS_MMC5XX3_ENABLED AP_COMPASS_I2C_BACKEND_DEFAULT_ENABLED124#endif125126#ifndef AP_COMPASS_QMC5883P_ENABLED127#define AP_COMPASS_QMC5883P_ENABLED AP_COMPASS_I2C_BACKEND_DEFAULT_ENABLED && (BOARD_FLASH_SIZE > 1024)128#endif129130#ifndef AP_COMPASS_QMC5883L_ENABLED131#define AP_COMPASS_QMC5883L_ENABLED AP_COMPASS_I2C_BACKEND_DEFAULT_ENABLED132#endif133134#ifndef AP_COMPASS_RM3100_ENABLED135#define AP_COMPASS_RM3100_ENABLED AP_COMPASS_I2C_BACKEND_DEFAULT_ENABLED136#endif137138139