mirror of https://github.com/ArduPilot/ardupilot
AP_Compass: add and use AP_COMPASS_MAG3110_ENABLED
This commit is contained in:
parent
3173c92417
commit
aac6228f58
|
@ -453,7 +453,9 @@ private:
|
|||
#if AP_COMPASS_SITL_ENABLED
|
||||
DRIVER_SITL =13,
|
||||
#endif
|
||||
#if AP_COMPASS_MAG3110_ENABLED
|
||||
DRIVER_MAG3110 =14,
|
||||
#endif
|
||||
#if AP_COMPASS_IST8308_ENABLED
|
||||
DRIVER_IST8308 =15,
|
||||
#endif
|
||||
|
|
|
@ -12,14 +12,16 @@
|
|||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "AP_Compass_MAG3110.h"
|
||||
|
||||
#if AP_COMPASS_MAG3110_ENABLED
|
||||
|
||||
#include <utility>
|
||||
|
||||
#include <AP_HAL/AP_HAL.h>
|
||||
#include <AP_Math/AP_Math.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "AP_Compass_MAG3110.h"
|
||||
|
||||
extern const AP_HAL::HAL &hal;
|
||||
|
||||
|
||||
|
@ -219,3 +221,5 @@ void AP_Compass_MAG3110::read()
|
|||
|
||||
drain_accumulated_samples(_compass_instance);
|
||||
}
|
||||
|
||||
#endif // AP_COMPASS_MAG3110_ENABLED
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
#pragma once
|
||||
|
||||
#include "AP_Compass_config.h"
|
||||
|
||||
#if AP_COMPASS_MAG3110_ENABLED
|
||||
|
||||
#include <AP_Common/AP_Common.h>
|
||||
#include <AP_HAL/AP_HAL.h>
|
||||
#include <AP_HAL/Device.h>
|
||||
|
@ -44,3 +48,5 @@ private:
|
|||
uint8_t _compass_instance;
|
||||
bool _initialised;
|
||||
};
|
||||
|
||||
#endif // AP_COMPASS_MAG3110_ENABLED
|
||||
|
|
|
@ -83,6 +83,10 @@
|
|||
#define AP_COMPASS_LSM9DS1_ENABLED AP_COMPASS_I2C_BACKEND_DEFAULT_ENABLED
|
||||
#endif
|
||||
|
||||
#ifndef AP_COMPASS_MAG3110_ENABLED
|
||||
#define AP_COMPASS_MAG3110_ENABLED AP_COMPASS_I2C_BACKEND_DEFAULT_ENABLED
|
||||
#endif
|
||||
|
||||
#ifndef AP_COMPASS_MMC3416_ENABLED
|
||||
#define AP_COMPASS_MMC3416_ENABLED AP_COMPASS_I2C_BACKEND_DEFAULT_ENABLED
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue